Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSvgFontStyle Class Reference

#include <qsvgstyle_p.h>

+ Inheritance diagram for QSvgFontStyle:
+ Collaboration diagram for QSvgFontStyle:

Public Member Functions

 QSvgFontStyle (QSvgFont *font, QSvgTinyDocument *doc)
 
 QSvgFontStyle ()
 
void apply (QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override
 
void revert (QPainter *p, QSvgExtraStates &states) override
 
Type type () const override
 
void setSize (qreal size)
 
void setTextAnchor (Qt::Alignment anchor)
 
void setFamily (const QString &family)
 
void setStyle (QFont::Style fontStyle)
 
void setVariant (QFont::Capitalization fontVariant)
 
void setWeight (int weight)
 
QSvgFontsvgFont () const
 
const QFontqfont () const
 
QSvgTinyDocumentdoc () const
 
- Public Member Functions inherited from QSvgStyleProperty
virtual ~QSvgStyleProperty ()
 
bool isDefault () const
 
- Public Member Functions inherited from QSvgRefCounted
 QSvgRefCounted ()
 
virtual ~QSvgRefCounted ()
 
void ref ()
 
void deref ()
 

Static Public Attributes

static const int LIGHTER = -1
 
static const int BOLDER = 1
 

Additional Inherited Members

- Public Types inherited from QSvgStyleProperty
enum  Type {
  QUALITY , FILL , VIEWPORT_FILL , FONT ,
  STROKE , SOLID_COLOR , GRADIENT , PATTERN ,
  TRANSFORM , ANIMATE_TRANSFORM , ANIMATE_COLOR , OPACITY ,
  COMP_OP
}
 

Detailed Description

Definition at line 307 of file qsvgstyle_p.h.

Constructor & Destructor Documentation

◆ QSvgFontStyle() [1/2]

QSvgFontStyle::QSvgFontStyle ( QSvgFont * font,
QSvgTinyDocument * doc )

Definition at line 173 of file qsvgstyle.cpp.

◆ QSvgFontStyle() [2/2]

QSvgFontStyle::QSvgFontStyle ( )

Definition at line 185 of file qsvgstyle.cpp.

Member Function Documentation

◆ apply()

void QSvgFontStyle::apply ( QPainter * p,
const QSvgNode * node,
QSvgExtraStates & states )
overridevirtual

Implements QSvgStyleProperty.

Definition at line 197 of file qsvgstyle.cpp.

References QFont::Black, BOLDER, QFont::capitalization(), QFont::families(), font, LIGHTER, QFont::pointSizeF(), qBound(), qMax(), qMin(), QFont::setCapitalization(), QFont::setFamilies(), QFont::setPointSizeF(), QFont::setStyle(), QFont::setWeight(), QFont::style(), and QFont::Thin.

Referenced by QSvgStyle::apply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doc()

QSvgTinyDocument * QSvgFontStyle::doc ( ) const
inline

Definition at line 366 of file qsvgstyle_p.h.

Referenced by parseFontFaceNameNode(), and parseFontFaceNode().

+ Here is the caller graph for this function:

◆ qfont()

const QFont & QSvgFontStyle::qfont ( ) const
inline

Definition at line 361 of file qsvgstyle_p.h.

Referenced by QSvgText::fastBounds().

+ Here is the caller graph for this function:

◆ revert()

void QSvgFontStyle::revert ( QPainter * p,
QSvgExtraStates & states )
overridevirtual

Implements QSvgStyleProperty.

Definition at line 238 of file qsvgstyle.cpp.

Referenced by QSvgStyle::revert().

+ Here is the caller graph for this function:

◆ setFamily()

void QSvgFontStyle::setFamily ( const QString & family)
inline

Definition at line 333 of file qsvgstyle_p.h.

◆ setSize()

void QSvgFontStyle::setSize ( qreal size)
inline

Definition at line 319 of file qsvgstyle_p.h.

◆ setStyle()

void QSvgFontStyle::setStyle ( QFont::Style fontStyle)
inline

Definition at line 339 of file qsvgstyle_p.h.

◆ setTextAnchor()

void QSvgFontStyle::setTextAnchor ( Qt::Alignment anchor)
inline

Definition at line 327 of file qsvgstyle_p.h.

◆ setVariant()

void QSvgFontStyle::setVariant ( QFont::Capitalization fontVariant)
inline

Definition at line 344 of file qsvgstyle_p.h.

◆ setWeight()

void QSvgFontStyle::setWeight ( int weight)
inline

Definition at line 350 of file qsvgstyle_p.h.

◆ svgFont()

QSvgFont * QSvgFontStyle::svgFont ( ) const
inline

Definition at line 356 of file qsvgstyle_p.h.

Referenced by parseFontFaceNameNode(), parseFontFaceNode(), parseGlyphNode(), and parseMissingGlyphNode().

+ Here is the caller graph for this function:

◆ type()

QSvgStyleProperty::Type QSvgFontStyle::type ( ) const
overridevirtual

Implements QSvgStyleProperty.

Definition at line 458 of file qsvgstyle.cpp.

References QSvgStyleProperty::FONT.

Member Data Documentation

◆ BOLDER

const int QSvgFontStyle::BOLDER = 1
static

Definition at line 311 of file qsvgstyle_p.h.

Referenced by apply(), and parseFont().

◆ LIGHTER

const int QSvgFontStyle::LIGHTER = -1
static

Definition at line 310 of file qsvgstyle_p.h.

Referenced by apply(), and parseFont().


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