TypeMetric.h revision 3ed852eea50f9d4cd633efb8c2b054b8e33c2530
1// This may look like C code, but it is really -*- C++ -*- 2// 3// Copyright Bob Friesenhahn, 2001, 2002 4// 5// TypeMetric Definition 6// 7// Container for font type metrics 8// 9 10#if !defined (Magick_TypeMetric_header) 11#define Magick_TypeMetric_header 12 13#include "Magick++/Include.h" 14 15namespace Magick 16{ 17 class MagickDLLDecl TypeMetric 18 { 19 friend class Image; 20 public: 21 22 TypeMetric ( void ); 23 ~TypeMetric ( void ); 24 25 // Ascent, the distance in pixels from the text baseline to the 26 // highest/upper grid coordinate used to place an outline point. 27 double ascent ( void ) const; 28 29 // Descent, the distance in pixels from the baseline to the lowest 30 // grid coordinate used to place an outline point. Always a 31 // negative value. 32 double descent ( void ) const; 33 34 // Text width in pixels. 35 double textWidth ( void ) const; 36 37 // Text height in pixels. 38 double textHeight ( void ) const; 39 40 // Maximum horizontal advance in pixels. 41 double maxHorizontalAdvance ( void ) const; 42 43 // 44 // Public methods below this point are for Magick++ use only. 45 // 46 47 private: 48 MagickCore::TypeMetric _typeMetric; 49 }; 50} // namespace Magick 51 52// 53// Inlines 54// 55 56 57#endif // Magick_TypeMetric_header 58