Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 09:14:24

0001 // This may look like C code, but it is really -*- C++ -*-
0002 //
0003 // Copyright Bob Friesenhahn, 2001, 2002
0004 //
0005 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
0006 // dedicated to making software imaging solutions freely available.
0007 //
0008 // TypeMetric Definition
0009 //
0010 // Container for font type metrics
0011 //
0012 
0013 #if !defined (Magick_TypeMetric_header)
0014 #define Magick_TypeMetric_header
0015 
0016 #include "Magick++/Include.h"
0017 #include "Magick++/Drawable.h"
0018 
0019 namespace Magick
0020 {
0021   class MagickPPExport TypeMetric
0022   {
0023     friend class Image;
0024 
0025   public:
0026 
0027     // Default constructor
0028     TypeMetric(void);
0029 
0030     // Destructor
0031     ~TypeMetric(void);
0032 
0033     // The distance in pixels from the text baseline to the highest/upper
0034     // grid coordinate used to place an outline point.
0035     double ascent(void) const;
0036 
0037     // The bounds of the type metric.
0038     Geometry bounds(void) const;
0039 
0040     // The distance in pixels from the baseline to the lowest grid coordinate
0041     // used to place an outline point. Always a negative value.
0042     double descent(void) const;
0043 
0044     // Maximum horizontal advance in pixels.
0045     double maxHorizontalAdvance(void) const;
0046 
0047     // The origin.
0048     Coordinate origin(void) const;
0049 
0050     // The number of pixels per em.
0051     Coordinate pixelsPerEm(void) const;
0052 
0053     // Text height in pixels.
0054     double textHeight(void) const;
0055 
0056     // Text width in pixels.
0057     double textWidth(void) const;
0058 
0059     // Underline position.
0060     double underlinePosition(void) const;
0061 
0062     // Underline thickness.
0063     double underlineThickness(void) const;
0064 
0065   private:
0066     MagickCore::TypeMetric _typeMetric;
0067   };
0068 } // namespace Magick
0069 
0070 #endif // Magick_TypeMetric_header