9#include <private/qsgcurveabstractnode_p.h>
10#include <private/qsgcontext_p.h>
11#include <private/qsgtexturematerial_p.h>
13#include <private/qrawfont_p.h>
14#include <QtGui/qcolor.h>
20 , m_geometry(
QSGGeometry::defaultAttributes_TexturedPoint2D(), 0)
21 , m_dirtyGeometry(
false)
43 if (m_glyphNode !=
nullptr)
49 m_styleColor = styleColor;
50 if (m_styleNode !=
nullptr)
56 if (m_style != style) {
58 m_dirtyGeometry =
true;
72 m_dirtyGeometry =
true;
74#ifdef QSG_RUNTIME_DESCRIPTION
97 m_glyphNode =
nullptr;
100 m_styleNode =
nullptr;
110 float fontScale = float(m_fontSize / curveGlyphAtlas->
fontSize());
115 raisedSunkenStyleNode ->
setColor(m_styleColor);
118 m_styleNode = raisedSunkenStyleNode;
121 outlineNode->
setColor(m_styleColor);
122 outlineNode->setStrokeWidth(2 / fontScale);
123 outlineNode->setLocalScale(fontScale);
125 m_styleNode = outlineNode;
128 const QVector<quint32> indexes = m_glyphs.
glyphIndexes();
133 curveGlyphAtlas->
addGlyph(m_glyphNode,
137 if (raisedSunkenStyleNode !=
nullptr) {
138 curveGlyphAtlas->
addGlyph(raisedSunkenStyleNode,
143 if (outlineNode !=
nullptr) {
153 if (m_styleNode !=
nullptr) {
161 m_dirtyGeometry =
false;
The QColor class provides colors based on RGB, HSV or CMYK values.
int pixelSize() const
Returns the pixel size of the font if it was set with setPixelSize().
The QGlyphRun class provides direct access to the internal glyphs in a font.
QList< quint32 > glyphIndexes() const
Returns the glyph indexes for this QGlyphRun object.
QRawFont rawFont() const
Returns the font selected for this QGlyphRun object.
QList< QPointF > positions() const
Returns the position of the edge of the baseline for each glyph in this set of glyph indexes.
qsizetype count() const noexcept
\inmodule QtCore\reentrant
The QRawFont class provides access to a single physical instance of a font.
QString familyName() const
Returns the family name of this QRawFont.
qreal pixelSize() const
Returns the pixel size set for this QRawFont.
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
virtual void setColor(QColor col)=0
virtual void cookGeometry()=0
void setColor(QColor col) override
void cookGeometry() override
void addStroke(QSGCurveStrokeNode *node, glyph_t glyph, const QPointF &position) const
void addGlyph(QSGCurveFillNode *node, glyph_t glyph, const QPointF &position, qreal pixelSize) const
void populate(const QList< glyph_t > &glyphs)
QSGCurveGlyphNode(QSGRenderContext *context)
void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override
void setColor(const QColor &color) override
void setStyle(QQuickText::TextStyle style) override
void preprocess() override
Override this function to do processing on the node before it is rendered.
void setStyleColor(const QColor &color) override
void setPreferredAntialiasingMode(AntialiasingMode) override
void setColor(QColor col) override
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...
void appendChildNode(QSGNode *node)
Appends node to this node's list of children.
void markDirty(DirtyState bits)
Notifies all connected renderers that the node has dirty bits.
void setFlag(Flag, bool=true)
Sets the flag f on this node if enabled is true; otherwise clears the flag.
virtual QSGCurveGlyphAtlas * curveGlyphAtlas(const QRawFont &font)
Factory function for curve atlases that can be used to provide geometry for the curve renderer for a ...
The QSGTextureMaterial class provides a convenient way of rendering textured geometry in the scene gr...
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
static const QCssKnownValue positions[NumKnownPositionModes - 1]
GLenum GLuint GLintptr offset
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
void qsgnode_set_description(QSGNode *node, const QString &description)
#define QStringLiteral(str)