Changeset 846 for trunk/src/gui/painting/qtextureglyphcache_p.h
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/painting/qtextureglyphcache_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 65 65 #endif 66 66 67 #ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 68 #define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 69 #endif 70 67 71 struct glyph_metrics_t; 68 72 typedef unsigned int glyph_t; … … 77 81 public: 78 82 QTextureGlyphCache(QFontEngineGlyphCache::Type type, const QTransform &matrix) 79 : QFontEngineGlyphCache(matrix, type), m_w(0), m_h(0), m_cx(0), m_cy(0) { } 83 : QFontEngineGlyphCache(matrix, type), m_current_fontengine(0), 84 m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0) 85 { } 80 86 81 87 virtual ~QTextureGlyphCache() { } … … 91 97 }; 92 98 93 void populate(const QTextItemInt &ti, 94 const QVarLengthArray<glyph_t> &glyphs, 95 const QVarLengthArray<QFixedPoint> &positions); 99 bool populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, 100 const QFixedPoint *positions); 96 101 97 102 virtual void createTextureData(int width, int height) = 0; 98 103 virtual void resizeTextureData(int width, int height) = 0; 99 104 virtual int glyphMargin() const { return 0; } 105 virtual int glyphPadding() const { return 0; } 100 106 101 107 virtual void fillTexture(const Coord &coord, glyph_t glyph) = 0; … … 112 118 113 119 QImage textureMapForGlyph(glyph_t g) const; 120 virtual int maxTextureWidth() const { return QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH; } 121 virtual int maxTextureHeight() const { return -1; } 114 122 115 123 protected: 116 const QTextItemInt *m_current_textitem;124 QFontEngine *m_current_fontengine; 117 125 118 126 int m_w; // image width … … 120 128 int m_cx; // current x 121 129 int m_cy; // current y 130 int m_currentRowHeight; // Height of last row 122 131 }; 123 132 124 133 125 class Q ImageTextureGlyphCache : public QTextureGlyphCache134 class Q_GUI_EXPORT QImageTextureGlyphCache : public QTextureGlyphCache 126 135 { 127 136 public:
Note:
See TracChangeset
for help on using the changeset viewer.