1 // This may look like C code, but it is really -*- C++ -*- 2 // 3 // Copyright Bob Friesenhahn, 2001 4 // Copyright Dirk Lemstra 2014 5 // 6 // TypeMetric implementation 7 // 8 9 #define MAGICKCORE_IMPLEMENTATION 1 10 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1 11 12 #include "Magick++/TypeMetric.h" 13 #include <string.h> 14 TypeMetric(void)15Magick::TypeMetric::TypeMetric(void) 16 { 17 ResetMagickMemory(&_typeMetric,0,sizeof(_typeMetric)); 18 } 19 ~TypeMetric(void)20Magick::TypeMetric::~TypeMetric(void) 21 { 22 } 23 ascent(void) const24double Magick::TypeMetric::ascent(void) const 25 { 26 return(_typeMetric.ascent); 27 } 28 descent(void) const29double Magick::TypeMetric::descent(void) const 30 { 31 return(_typeMetric.descent); 32 } 33 maxHorizontalAdvance(void) const34double Magick::TypeMetric::maxHorizontalAdvance(void) const 35 { 36 return(_typeMetric.max_advance); 37 } 38 textHeight(void) const39double Magick::TypeMetric::textHeight(void) const 40 { 41 return(_typeMetric.height); 42 } 43 textWidth(void) const44double Magick::TypeMetric::textWidth(void) const 45 { 46 return(_typeMetric.width); 47 } 48 underlinePosition(void) const49double Magick::TypeMetric::underlinePosition(void) const 50 { 51 return(_typeMetric.underline_position); 52 } 53 underlineThickness(void) const54double Magick::TypeMetric::underlineThickness(void) const 55 { 56 return(_typeMetric.underline_thickness); 57 } 58