Magick++ 7.1.1
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
 
virtual void operator() (MagickCore::DrawingWand *) const
 
virtual DrawableBasecopy () 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/3]

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

Definition at line 779 of file Drawable.cpp.

780 : _font(font_),
781 _family(),
782 _style(Magick::AnyStyle),
783 _weight(400),
784 _stretch(Magick::NormalStretch)
785{
786}

◆ DrawableFont() [2/3]

Magick::DrawableFont::DrawableFont ( const std::string &  family_,
Magick::StyleType  style_,
const unsigned int  weight_,
Magick::StretchType  stretch_ 
)

Definition at line 787 of file Drawable.cpp.

791 : _font(),
792 _family(family_),
793 _style(style_),
794 _weight(weight_),
795 _stretch(stretch_)
796{
797}

◆ DrawableFont() [3/3]

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

Definition at line 798 of file Drawable.cpp.

799 : DrawableBase (original_),
800 _font(original_._font),
801 _family(original_._family),
802 _style(original_._style),
803 _weight(original_._weight),
804 _stretch(original_._stretch)
805{
806}

◆ ~DrawableFont()

Magick::DrawableFont::~DrawableFont ( void  )

Definition at line 807 of file Drawable.cpp.

808{
809}

Member Function Documentation

◆ copy()

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

Reimplemented from Magick::DrawableBase.

Definition at line 833 of file Drawable.cpp.

834{
835 return new DrawableFont(*this);
836}

◆ font() [1/2]

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

Definition at line 1073 of file Drawable.h.

1074 {
1075 _font = font_;
1076 }

◆ font() [2/2]

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

Definition at line 1077 of file Drawable.h.

1078 {
1079 return _font;
1080 }

◆ operator()()

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

Reimplemented from Magick::DrawableBase.

Definition at line 810 of file Drawable.cpp.

811{
812 // font
813 if(_font.length())
814 {
815 (void) DrawSetFont( context_, _font.c_str() );
816 }
817
818 if(_family.length())
819 {
820 // font-family
821 (void) DrawSetFontFamily( context_, _family.c_str() );
822
823 // font-style
824 DrawSetFontStyle( context_, _style );
825
826 // font-weight
827 DrawSetFontWeight( context_, _weight );
828
829 // font-stretch
830 DrawSetFontStretch( context_, _stretch );
831 }
832}

Member Data 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: