diff options
Diffstat (limited to 'src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 16 |
1 files changed, 15 insertions, 1 deletions
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(); |