4#ifndef QTEXTUREGLYPHCACHE_P_H
5#define QTEXTUREGLYPHCACHE_P_H
18#include <QtGui/private/qtguiglobal_p.h>
24#include <private/qfontengineglyphcache_p.h>
26#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH
27#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256
43 m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0)
51 : glyph(
g), subPixelPosition(spp) {}
55 return glyph ==
other.glyph && subPixelPosition ==
other.subPixelPosition;
73 return w == 0 ||
h == 0;
81 QPainter::RenderHints renderHints = QPainter::RenderHints(),
82 bool includeGlyphCacheScale =
false);
84 void fillInPendingGlyphs();
109 inline bool isNull()
const {
return m_h == 0; }
118 int calculateSubPixelPositionCount(
glyph_t)
const;
134 g.subPixelPosition.x.value(),
135 g.subPixelPosition.y.value());
146 virtual void createTextureData(
int width,
int height)
override;
147 virtual void resizeTextureData(
int width,
int height)
override;
148 virtual void fillTexture(
const Coord &
c,
The QColor class provides colors based on RGB, HSV or CMYK values.
QImageTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
const QImage & image() const
QHash< GlyphAndSubPixelPosition, Coord > coords
QFontEngine * m_current_fontengine
virtual int maxTextureHeight() const
void resizeCache(int width, int height)
virtual void endFillTexture()
bool hasPendingGlyphs() const
virtual void fillTexture(const Coord &coord, glyph_t glyph, const QFixedPoint &subPixelPosition)=0
virtual void resizeTextureData(int width, int height)=0
virtual void beginFillTexture()
void createCache(int width, int height)
QHash< GlyphAndSubPixelPosition, Coord > m_pendingGlyphs
virtual void createTextureData(int width, int height)=0
virtual int maxTextureWidth() const
QTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
virtual int glyphPadding() const
Combined button and popup list for selecting options.
static const QCssKnownValue positions[NumKnownPositionModes - 1]
constexpr QtPrivate::QHashMultiReturnType< T... > qHashMulti(size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >)
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum const void GLbitfield GLsizei numGlyphs
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
size_t qHash(const QTextureGlyphCache::GlyphAndSubPixelPosition &g, size_t seed=0)
#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH
QFixedPoint subPixelPosition
bool operator==(const GlyphAndSubPixelPosition &other) const
GlyphAndSubPixelPosition(glyph_t g, const QFixedPoint &spp)