![]() |
Qt 6.x
The Qt SDK
|
#include <qsvgfont_p.h>
Public Member Functions | |
QSvgFont (qreal horizAdvX) | |
void | setFamilyName (const QString &name) |
QString | familyName () const |
void | setUnitsPerEm (qreal upem) |
void | addGlyph (QChar unicode, const QPainterPath &path, qreal horizAdvX=-1) |
void | draw (QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const |
![]() | |
QSvgRefCounted () | |
virtual | ~QSvgRefCounted () |
void | ref () |
void | deref () |
Public Attributes | |
QString | m_familyName |
qreal | m_unitsPerEm = DEFAULT_UNITS_PER_EM |
qreal | m_horizAdvX |
QHash< QChar, QSvgGlyph > | m_glyphs |
Static Public Attributes | |
static constexpr qreal | DEFAULT_UNITS_PER_EM = 1000 |
Definition at line 38 of file qsvgfont_p.h.
QSvgFont::QSvgFont | ( | qreal | horizAdvX | ) |
Definition at line 20 of file qsvgfont.cpp.
void QSvgFont::addGlyph | ( | QChar | unicode, |
const QPainterPath & | path, | ||
qreal | horizAdvX = -1 |
||
) |
Definition at line 32 of file qsvgfont.cpp.
References QHash< Key, T >::insert(), m_glyphs, and m_horizAdvX.
void QSvgFont::draw | ( | QPainter * | p, |
const QPointF & | point, | ||
const QString & | str, | ||
qreal | pixelSize, | ||
Qt::Alignment | alignment | ||
) | const |
Definition at line 39 of file qsvgfont.cpp.
References Qt::AlignHCenter, alignment, Qt::AlignRight, QString::constBegin(), QString::constEnd(), QHash< Key, T >::contains(), m_glyphs, m_horizAdvX, m_unitsPerEm, QPen::setWidthF(), QPoint::setX(), and str.
QString QSvgFont::familyName | ( | ) | const |
Definition at line 26 of file qsvgfont.cpp.
References m_familyName.
Definition at line 90 of file qsvgfont.cpp.
References m_familyName.
Definition at line 95 of file qsvgfont.cpp.
References m_unitsPerEm.
|
staticconstexpr |
Definition at line 41 of file qsvgfont_p.h.
Referenced by parseFontFaceNode().
QString QSvgFont::m_familyName |
Definition at line 53 of file qsvgfont_p.h.
Referenced by familyName(), and setFamilyName().
Definition at line 56 of file qsvgfont_p.h.
Referenced by addGlyph(), and draw().
qreal QSvgFont::m_horizAdvX |
Definition at line 55 of file qsvgfont_p.h.
Referenced by addGlyph(), and draw().
qreal QSvgFont::m_unitsPerEm = DEFAULT_UNITS_PER_EM |
Definition at line 54 of file qsvgfont_p.h.
Referenced by draw(), and setUnitsPerEm().