4#ifndef QSGDEFAULTGLYPHNODE_P_P_H
5#define QSGDEFAULTGLYPHNODE_P_P_H
19#include <QtQuick/qsgmaterial.h>
20#include <QtQuick/qsgtexture.h>
21#include <QtQuick/qsggeometry.h>
22#include <qshareddata.h>
23#include <QtQuick/private/qsgplaintexture_p.h>
24#include <QtQuick/private/qsgrhitextureglyphcache_p.h>
32class QSGRenderContext;
33class QSGDefaultRenderContext;
43 int compare(
const QSGMaterial *other)
const override;
46 const auto rgbC = c.toRgb();
47 setColor(QVector4D(rgbC.redF(), rgbC.greenF(), rgbC.blueF(), rgbC.alphaF())
);
49 void setColor(
const QVector4D &color);
59 void populate(
const QPointF &position,
60 const QVector<quint32> &glyphIndexes,
const QVector<QPointF> &glyphPositions,
61 QSGGeometry *geometry, QRectF *boundingRect, QPointF *baseLine,
65 void init(QFontEngine::GlyphFormat glyphFormat);
66 void updateCache(QFontEngine::GlyphFormat glyphFormat);
68 QSGDefaultRenderContext *m_rc;
69 QSGPlainTexture *m_texture;
70 QExplicitlySharedDataPointer<QFontEngineGlyphCache> m_glyphCache;
88 const auto rgbC = c.toRgb();
89 m_styleColor = QVector4D(rgbC.redF(), rgbC.greenF(), rgbC.blueF(), rgbC.alphaF());
96 int compare(
const QSGMaterial *other)
const override;
99 QVector2D m_styleShift;
100 QVector4D m_styleColor;
constexpr void setTop(int top) noexcept
Sets the Top margin to Top.
constexpr void setBottom(int bottom) noexcept
Sets the bottom margin to bottom.
constexpr QMargins(int left, int top, int right, int bottom) noexcept
Constructs margins with the given left, top, right, and bottom.
The QRawFont class provides access to a single physical instance of a font.
QSGOutlinedTextMaterial(QSGRenderContext *rc, const QRawFont &font)
~QSGOutlinedTextMaterial()
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
void setStyleColor(const QVector4D &color)
const QVector2D & styleShift() const
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
virtual ~QSGStyledTextMaterial()
void setStyleShift(const QVector2D &shift)
QSGStyledTextMaterial(QSGRenderContext *rc, const QRawFont &font)
const QVector4D & styleColor() const
void setStyleColor(const QColor &c)
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGTextMaskMaterial(QSGRenderContext *rc, const QVector4D &color, const QRawFont &font, QFontEngine::GlyphFormat glyphFormat=QFontEngine::Format_None)
void setColor(const QVector4D &color)
const QVector4D & color() const
virtual ~QSGTextMaskMaterial()
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
void setColor(const QColor &c)
QTextureGlyphCache * glyphCache() const
QSGRhiTextureGlyphCache * rhiGlyphCache() const
void populate(const QPointF &position, const QVector< quint32 > &glyphIndexes, const QVector< QPointF > &glyphPositions, QSGGeometry *geometry, QRectF *boundingRect, QPointF *baseLine, const QMargins &margins=QMargins(0, 0, 0, 0))
QSGTexture * texture() const