diff options
| author | Mike Wey | 2011-08-28 19:41:27 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-08-28 19:41:27 +0200 |
| commit | 6dce2778d911d8a08b492af1c5f43e707a1de790 (patch) | |
| tree | 7d69b9a90bb79225f8ec5131e6e39fcccb8c49d5 /dmagick/Options.d | |
| parent | 64d0db95dc33f9b00784826e37136323fdf4cfd9 (diff) | |
Add the Draw / ImageInfo properties to the DrawingContext.
Diffstat (limited to 'dmagick/Options.d')
| -rw-r--r-- | dmagick/Options.d | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/dmagick/Options.d b/dmagick/Options.d index 5e7e033..d11366e 100644 --- a/dmagick/Options.d +++ b/dmagick/Options.d @@ -31,6 +31,7 @@ import dmagick.c.memory; import dmagick.c.option; import dmagick.c.quantize; import dmagick.c.quantum; +import dmagick.c.type; /** * A class that wraps ImageInfo, DrawInfo and QuantizeInfo @@ -859,6 +860,55 @@ class Options } /** + * Specify the font family, such as "arial" or "helvetica". + */ + void fontFamily(string type) + { + copyString(drawInfo.family, type); + } + ///ditto + string fontFamily() const + { + return to!(string)(drawInfo.family); + } + + void fontStretch(StretchType type) + { + drawInfo.stretch = type; + } + ///ditto + StretchType fontStretch() const + { + return drawInfo.stretch; + } + + /** + * Specify the font style, i.e. italic, oblique, or normal. + */ + void fontStyle(StyleType type) + { + drawInfo.style = type; + } + ///ditto + StyleType fontStyle() const + { + return drawInfo.style; + } + + /** + * Specify the font style, i.e. italic, oblique, or normal. + */ + void fontWeight(size_t weight) + { + drawInfo.weight = type; + } + ///ditto + size_t fontWeight() const + { + return drawInfo.weight; + } + + /** * Enable or disable anti-aliasing when drawing object outlines. */ void strokeAntialias(bool antialias) @@ -1054,10 +1104,6 @@ class Options //char* text; //size_t face; //char* metrics, - //char* family; - //StyleType style; - //StretchType stretch; - //size_t weight; //AlignType align; //char* clip_mask; //SegmentInfo bounds; |
