14 : m_unicode(unicode), m_path(
path), m_horizAdvX(horizAdvX)
21 : m_horizAdvX(horizAdvX)
55 textWidth +=
static_cast<int>(
m_glyphs[unicode].m_horizAdvX);
58 QPoint alignmentOffset(0, 0);
60 alignmentOffset.
setX(-textWidth / 2);
62 alignmentOffset.
setX(-textWidth);
65 p->translate(alignmentOffset);
69 qreal penWidth =
p->pen().widthF();
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
The QPainter class performs low-level painting on widgets and other paint devices.
void setWidthF(qreal width)
Sets the pen width to the given width in pixels with floating point precision.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr void setX(int x) noexcept
Sets the x coordinate of this point to the given x coordinate.
\macro QT_RESTRICTED_CAST_FROM_ASCII
const_iterator constEnd() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing just after the last character in...
const_iterator constBegin() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first character in the st...
QString familyName() const
QSvgFont(qreal horizAdvX)
QHash< QChar, QSvgGlyph > m_glyphs
void setUnitsPerEm(qreal upem)
void draw(QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const
void addGlyph(QChar unicode, const QPainterPath &path, qreal horizAdvX=-1)
void setFamilyName(const QString &name)
Combined button and popup list for selecting options.
GLsizei const GLchar *const * path