src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   106     void addRect(const QRectF &rect);
   106     void addRect(const QRectF &rect);
   107     void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true);
   107     void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true);
   108     void clear();
   108     void clear();
   109 
   109 
   110     QGLPoint*        data() {return vertexArray.data();}
   110     QGLPoint*        data() {return vertexArray.data();}
   111     QVector<int>&   stops() {return vertexArrayStops;}
   111     int *stops() const { return vertexArrayStops.data(); }
       
   112     int stopCount() const { return vertexArrayStops.size(); }
   112     QGLRect         boundingRect() const;
   113     QGLRect         boundingRect() const;
       
   114 
       
   115     int vertexCount() const { return vertexArray.size(); }
   113 
   116 
   114     void lineToArray(const GLfloat x, const GLfloat y);
   117     void lineToArray(const GLfloat x, const GLfloat y);
   115 
   118 
   116 private:
   119 private:
   117     QDataBuffer<QGLPoint> vertexArray;
   120     QDataBuffer<QGLPoint> vertexArray;
   118     QVector<int>          vertexArrayStops;
   121     QDataBuffer<int>      vertexArrayStops;
   119 
   122 
   120     GLfloat     maxX;
   123     GLfloat     maxX;
   121     GLfloat     maxY;
   124     GLfloat     maxY;
   122     GLfloat     minX;
   125     GLfloat     minX;
   123     GLfloat     minY;
   126     GLfloat     minY;
   124     bool        boundingRectDirty;
   127     bool        boundingRectDirty;
   125 
       
   126     inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale);
       
   127 
       
   128     void addClosingLine(int index);
   128     void addClosingLine(int index);
   129     void addCentroid(const QVectorPath &path, int subPathIndex);
   129     void addCentroid(const QVectorPath &path, int subPathIndex);
   130 };
   130 };
   131 
   131 
   132 QT_END_NAMESPACE
   132 QT_END_NAMESPACE