Loading...
Searching...
No Matches
Magick::DrawableFont Class Reference
Inheritance diagram for Magick::DrawableFont:

## Public Member Functions

| DrawableFont (const std::string &font_)
| DrawableFont (const std::string &family_, StyleType style_, const unsigned int weight_, StretchType stretch_)
| DrawableFont (const DrawableFont &original_)
void | operator() (MagickCore::DrawingWand *context_) const
DrawableBase * | copy () const
void | font (const std::string &font_)
std::string | font (void) const

## Private Attributes

std::string | _font
std::string | _family
StyleType | _style
unsigned int | _weight
StretchType | _stretch

## Detailed Description

Definition at line 1054 of file Drawable.h.

## Constructor & Destructor Documentation

## DrawableFont() [1/2]

Magick::DrawableFont::DrawableFont | ( | const std::string & | font_ | ) |

Definition at line 779 of file Drawable.cpp.

: _font(font_),
_family(),
_style(Magick::AnyStyle),
_weight(400),
_stretch(Magick::NormalStretch)
{
}

## DrawableFont() [2/2]

Magick::DrawableFont::DrawableFont | ( | const DrawableFont & | original_ | ) |

Definition at line 798 of file Drawable.cpp.

: DrawableBase (original_),
_font(original_._font),
_family(original_._family),
_style(original_._style),
_weight(original_._weight),
_stretch(original_._stretch)
{
}

## ~DrawableFont()

Magick::DrawableFont::~DrawableFont | ( | void |  | ) |

Definition at line 807 of file Drawable.cpp.

{
}

## Member Function Documentation

## copy()

Magick::DrawableBase * Magick::DrawableFont::copy | ( |  | ) | const

virtual

Reimplemented from Magick::DrawableBase.

Definition at line 833 of file Drawable.cpp.

{
return new DrawableFont(*this);
}

## font() [1/2]

void Magick::DrawableFont::font | ( | const std::string & | font_ | ) |

inline

Definition at line 1073 of file Drawable.h.

{
_font = font_;
}

## font() [2/2]

std::string Magick::DrawableFont::font | ( | void |  | ) | const

inline

Definition at line 1077 of file Drawable.h.

{
return _font;
}

## operator()()

void Magick::DrawableFont::operator() | ( | MagickCore::DrawingWand * | context_ | ) | const

virtual

Reimplemented from Magick::DrawableBase.

Definition at line 810 of file Drawable.cpp.

{
// font
if(_font.length())
{
(void) DrawSetFont( context_, _font.c_str() );
}
if(_family.length())
{
// font-family
(void) DrawSetFontFamily( context_, _family.c_str() );
// font-style
DrawSetFontStyle( context_, _style );
// font-weight
DrawSetFontWeight( context_, _weight );
// font-stretch
DrawSetFontStretch( context_, _stretch );
}
}

## Field Documentation

## _family

std::string Magick::DrawableFont::_family

private

Definition at line 1084 of file Drawable.h.

## _font

std::string Magick::DrawableFont::_font

private

Definition at line 1083 of file Drawable.h.

## _stretch

StretchType Magick::DrawableFont::_stretch

private

Definition at line 1087 of file Drawable.h.

## _style

StyleType Magick::DrawableFont::_style

private

Definition at line 1085 of file Drawable.h.

## _weight

unsigned int Magick::DrawableFont::_weight

private

Definition at line 1086 of file Drawable.h.

The documentation for this class was generated from the following files:

- Drawable.h
- Drawable.cpp