diff options
| author | Mike Wey | 2011-09-13 23:30:06 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-09-13 23:30:06 +0200 |
| commit | 5c5587992fa5bfc27e315c419d67c15872ce0be0 (patch) | |
| tree | b01c91fc6f888db3b6ea4d77bd1b2cd08122ff01 | |
| parent | 0d8b4ac4088155156e4ec224cbe743021b7454de (diff) | |
Document dmagick.c.draw.TypeMetrics.
| -rw-r--r-- | dmagick/c/draw.d | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/dmagick/c/draw.d b/dmagick/c/draw.d index 9d2d8cb..df9deac 100644 --- a/dmagick/c/draw.d +++ b/dmagick/c/draw.d @@ -332,25 +332,60 @@ extern(C) text; } + /** + * This is used to reprecent text/font mesurements. + */ struct TypeMetric { - PointInfo - pixels_per_em; - - double - ascent, - descent, - width, - height, - max_advance, - underline_position, - underline_thickness; - - SegmentInfo - bounds; - - PointInfo - origin; + /** + * Horizontal (x) and vertical (y) pixels per em. + */ + PointInfo pixels_per_em; + + /** + * The distance in pixels from the text baseline to the + * highest/upper grid coordinate used to place an outline point. + * Always a positive value. + */ + double ascent; + + /** + * The distance in pixels from the baseline to the lowest grid + * coordinate used to place an outline point. + * Always a negative value. + */ + double descent; + + /** + * Text width in pixels. + */ + double width; + + /** + * Text height in pixels. + */ + double height; + + /** + * The maximum horizontal advance (advance from the beginning + * of a character to the beginning of the next character) in + * pixels. + */ + double max_advance; + + double underline_position; /// + double underline_thickness; /// + + /** + * This is an imaginary box that encloses all glyphs from the font, + * usually as tightly as possible. + */ + SegmentInfo bounds; + + /** + * A virtual point, located on the baseline, used to locate glyphs. + */ + PointInfo origin; } DrawInfo* AcquireDrawInfo(); |
