5#include <QtGui/private/qrawfont_p.h>
10 : m_geometry(
QSGGeometry::defaultAttributes_TexturedPoint2D(), 0)
32 const QVector<uint> glyphIndexes = glyphs.
glyphIndexes();
33 const QVector<QPointF> glyphPositions = glyphs.
positions();
34 for (
int i = 0,
n =
qMin(glyphIndexes.size(), glyphPositions.size());
i <
n; ++
i) {
43 maxX = gm.x + gm.width;
44 maxY = gm.y + gm.height;
46 minX =
qMin(gm.x, minX);
The QColor class provides colors based on RGB, HSV or CMYK values.
virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QFixedPoint &, const QTransform &matrix, GlyphFormat)
virtual int glyphMargin(GlyphFormat format)
The QGlyphRun class provides direct access to the internal glyphs in a font.
void setOverline(bool overline)
Indicates that this QGlyphRun should be painted with an overline decoration if overline is true.
void setUnderline(bool underline)
Indicates that this QGlyphRun should be painted with an underline decoration if underline is true.
QList< quint32 > glyphIndexes() const
Returns the glyph indexes for this QGlyphRun object.
QRawFont rawFont() const
Returns the font selected for this QGlyphRun object.
void setStrikeOut(bool strikeOut)
Indicates that this QGlyphRun should be painted with an strike out decoration if strikeOut is true.
QList< QPointF > positions() const
Returns the position of the edge of the baseline for each glyph in this set of glyph indexes.
qreal devicePixelRatio() const
The QPainter class performs low-level painting on widgets and other paint devices.
QPaintDevice * device() const
Returns the paint device on which this painter is currently painting, or \nullptr if the painter is n...
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
Draws the glyphs represented by glyphs at position.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
\inmodule QtCore\reentrant
static QRawFontPrivate * get(const QRawFont &font)
qreal ascent() const
Returns the ascent of this QRawFont in pixel units.
\inmodule QtCore\reentrant
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
void setMaterial(QSGMaterial *material)
Sets the material of this geometry node to material.
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
The QSGMaterial class encapsulates rendering state for a shader program.
void setStyleColor(const QColor &color) override
void setColor(const QColor &color) override
void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override
void setStyle(QQuickText::TextStyle style) override
void paint(QPainter *painter)
void setPreferredAntialiasingMode(AntialiasingMode) override
QPointF baseLine() const override
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
GLenum GLuint GLintptr offset
GLfloat GLfloat GLfloat GLfloat maxX
static const QRectF boundingRect(const QPointF *points, int pointCount)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static constexpr QFixed fromReal(qreal r)
constexpr qreal toReal() const