30 QSGDistanceFieldTextMaterial();
31 ~QSGDistanceFieldTextMaterial();
33 QSGMaterialType *type()
const override;
34 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const override;
35 int compare(
const QSGMaterial *other)
const override;
37 virtual void setColor(
const QColor &color);
38 const QVector4D &color()
const {
return m_color; }
40 void setGlyphCache(QSGDistanceFieldGlyphCache *a) { m_glyph_cache = a; }
41 QSGDistanceFieldGlyphCache *glyphCache()
const {
return m_glyph_cache; }
43 void setTexture(
const QSGDistanceFieldGlyphCache::Texture * tex) { m_texture = tex; }
44 const QSGDistanceFieldGlyphCache::Texture * texture()
const {
return m_texture; }
46 void setFontScale(qreal fontScale) { m_fontScale = fontScale; }
47 qreal fontScale()
const {
return m_fontScale; }
49 QSize textureSize()
const {
return m_size; }
51 bool updateTextureSize();
52 bool updateTextureSizeAndWrapper();
53 QSGTexture *wrapperTexture()
const {
return m_sgTexture; }
58 QSGDistanceFieldGlyphCache *m_glyph_cache;
59 const QSGDistanceFieldGlyphCache::Texture *m_texture;
61 QSGPlainTexture *m_sgTexture;
94 QSGDistanceFieldShiftedStyleTextMaterial();
95 ~QSGDistanceFieldShiftedStyleTextMaterial();
97 QSGMaterialType *type()
const override;
98 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const override;
99 int compare(
const QSGMaterial *other)
const override;
101 void setShift(
const QPointF &shift) { m_shift = shift; }
102 const QPointF &shift()
const {
return m_shift; }