Magick++ 6.9.13
Loading...
Searching...
No Matches
Magick::DrawableFont Class Reference
Inheritance diagram for Magick::DrawableFont:
Collaboration 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
DrawableBasecopy () 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 943 of file Drawable.h.

Constructor & Destructor Documentation

◆ DrawableFont() [1/2]

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

Definition at line 647 of file Drawable.cpp.

648 : _font(font_),
649 _family(),
650 _style(Magick::AnyStyle),
651 _weight(400),
652 _stretch(Magick::NormalStretch)
653{
654}

◆ DrawableFont() [2/2]

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

Definition at line 666 of file Drawable.cpp.

667 : DrawableBase (original_),
668 _font(original_._font),
669 _family(original_._family),
670 _style(original_._style),
671 _weight(original_._weight),
672 _stretch(original_._stretch)
673{
674}

◆ ~DrawableFont()

Magick::DrawableFont::~DrawableFont ( void )

Definition at line 675 of file Drawable.cpp.

676{
677}

Member Function Documentation

◆ copy()

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

Implements Magick::DrawableBase.

Definition at line 701 of file Drawable.cpp.

702{
703 return new DrawableFont(*this);
704}

◆ font() [1/2]

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

Definition at line 962 of file Drawable.h.

963 {
964 _font = font_;
965 }

◆ font() [2/2]

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

Definition at line 966 of file Drawable.h.

967 {
968 return _font;
969 }

◆ operator()()

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

Implements Magick::DrawableBase.

Definition at line 678 of file Drawable.cpp.

679{
680 // font
681 if(_font.length())
682 {
683 (void) DrawSetFont( context_, _font.c_str() );
684 }
685
686 if(_family.length())
687 {
688 // font-family
689 (void) DrawSetFontFamily( context_, _family.c_str() );
690
691 // font-style
692 DrawSetFontStyle( context_, _style );
693
694 // font-weight
695 DrawSetFontWeight( context_, _weight );
696
697 // font-stretch
698 DrawSetFontStretch( context_, _stretch );
699 }
700}

Member Data Documentation

◆ _family

std::string Magick::DrawableFont::_family
private

Definition at line 973 of file Drawable.h.

◆ _font

std::string Magick::DrawableFont::_font
private

Definition at line 972 of file Drawable.h.

◆ _stretch

StretchType Magick::DrawableFont::_stretch
private

Definition at line 976 of file Drawable.h.

◆ _style

StyleType Magick::DrawableFont::_style
private

Definition at line 974 of file Drawable.h.

◆ _weight

unsigned int Magick::DrawableFont::_weight
private

Definition at line 975 of file Drawable.h.


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