Changeset 846 for trunk/src/opengl/gl2paintengineex/qgl2pexvertexarray_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/opengl/gl2paintengineex/qgl2pexvertexarray_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) … … 94 94 GLfloat bottom; 95 95 96 operator QRectF() {return QRectF(left, top, right-left, bottom-top);}96 operator QRectF() const {return QRectF(left, top, right-left, bottom-top);} 97 97 }; 98 98 … … 101 101 public: 102 102 QGL2PEXVertexArray() : 103 vertexArray(0), vertexArrayStops(0), 103 104 maxX(-2e10), maxY(-2e10), minX(2e10), minY(2e10), 104 boundingRectDirty(true) {} 105 boundingRectDirty(true) 106 { } 107 108 inline void addRect(const QRectF &rect) 109 { 110 qreal top = rect.top(); 111 qreal left = rect.left(); 112 qreal bottom = rect.bottom(); 113 qreal right = rect.right(); 114 115 vertexArray << QGLPoint(left, top) 116 << QGLPoint(right, top) 117 << QGLPoint(right, bottom) 118 << QGLPoint(right, bottom) 119 << QGLPoint(left, bottom) 120 << QGLPoint(left, top); 121 } 105 122 106 void addRect(const QRectF &rect); 123 inline void addQuad(const QRectF &rect) 124 { 125 qreal top = rect.top(); 126 qreal left = rect.left(); 127 qreal bottom = rect.bottom(); 128 qreal right = rect.right(); 129 130 vertexArray << QGLPoint(left, top) 131 << QGLPoint(right, top) 132 << QGLPoint(left, bottom) 133 << QGLPoint(right, bottom); 134 135 } 136 137 inline void addVertex(const GLfloat x, const GLfloat y) 138 { 139 vertexArray.add(QGLPoint(x, y)); 140 } 141 107 142 void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true); 108 143 void clear();
Note:
See TracChangeset
for help on using the changeset viewer.