diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | 15 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 16 |
2 files changed, 15 insertions, 16 deletions
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index 3f08dbe..e454c12 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -61,21 +61,6 @@ QGLRect QGL2PEXVertexArray::boundingRect() const return QGLRect(minX, minY, maxX, maxY); } -void QGL2PEXVertexArray::addRect(const QRectF &rect) -{ - qreal top = rect.top(); - qreal left = rect.left(); - qreal bottom = rect.bottom(); - qreal right = rect.right(); - - vertexArray << QGLPoint(left, top) - << QGLPoint(right, top) - << QGLPoint(right, bottom) - << QGLPoint(right, bottom) - << QGLPoint(left, bottom) - << QGLPoint(left, top); -} - void QGL2PEXVertexArray::addClosingLine(int index) { if (QPointF(vertexArray.at(index)) != QPointF(vertexArray.last())) diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index e0497b1..ae73040 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -102,8 +102,22 @@ public: QGL2PEXVertexArray() : maxX(-2e10), maxY(-2e10), minX(2e10), minY(2e10), boundingRectDirty(true) {} + + inline void addRect(const QRectF &rect) + { + qreal top = rect.top(); + qreal left = rect.left(); + qreal bottom = rect.bottom(); + qreal right = rect.right(); + + vertexArray << QGLPoint(left, top) + << QGLPoint(right, top) + << QGLPoint(right, bottom) + << QGLPoint(right, bottom) + << QGLPoint(left, bottom) + << QGLPoint(left, top); + } - void addRect(const QRectF &rect); void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true); void clear(); |