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