31 QSGDistanceFieldTextMaterial();
32 ~QSGDistanceFieldTextMaterial();
34 QSGMaterialType *type()
const override;
35 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const override;
36 int compare(
const QSGMaterial *other)
const override;
38 virtual void setColor(
const QColor &color);
39 const QVector4D &color()
const {
return m_color; }
41 void setGlyphCache(QSGDistanceFieldGlyphCache *a) { m_glyph_cache = a; }
42 QSGDistanceFieldGlyphCache *glyphCache()
const {
return m_glyph_cache; }
44 void setTexture(
const QSGDistanceFieldGlyphCache::Texture * tex) { m_texture = tex; }
45 const QSGDistanceFieldGlyphCache::Texture * texture()
const {
return m_texture; }
47 void setFontScale(qreal fontScale) { m_fontScale = fontScale; }
48 qreal fontScale()
const {
return m_fontScale; }
50 QSize textureSize()
const {
return m_size; }
52 bool updateTextureSize();
53 bool updateTextureSizeAndWrapper();
54 QSGTexture *wrapperTexture()
const {
return m_sgTexture; }
59 QSGDistanceFieldGlyphCache *m_glyph_cache;
60 const QSGDistanceFieldGlyphCache::Texture *m_texture;
62 QSGPlainTexture *m_sgTexture;
95 QSGDistanceFieldShiftedStyleTextMaterial();
96 ~QSGDistanceFieldShiftedStyleTextMaterial();
98 QSGMaterialType *type()
const override;
99 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode)
const override;
100 int compare(
const QSGMaterial *other)
const override;
102 void setShift(
const QPointF &shift) { m_shift = shift; }
103 const QPointF &shift()
const {
return m_shift; }