Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtOpenGL module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5151//
    5252
     53#ifndef QGL2PEXVERTEXARRAY_P_H
     54#define QGL2PEXVERTEXARRAY_P_H
     55
    5356#include <QRectF>
    5457
     
    5659#include <private/qvectorpath_p.h>
    5760#include <private/qgl_p.h>
     61
     62QT_BEGIN_NAMESPACE
    5863
    5964class QGLPoint
     
    6368        x(new_x), y(new_y) {};
    6469
    65     QGLPoint(QPointF p) :
     70    QGLPoint(const QPointF &p) :
    6671        x(p.x()), y(p.y()) {};
    6772
     
    7883struct QGLRect
    7984{
    80     QGLRect(QRectF r)
     85    QGLRect(const QRectF &r)
    8186        :  left(r.left()), top(r.top()), right(r.right()), bottom(r.bottom()) {}
    8287
     
    99104        boundingRectDirty(true) {}
    100105
    101     void addPath(const QVectorPath &path, GLfloat curveInverseScale);
     106    void addRect(const QRectF &rect);
     107    void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true);
    102108    void clear();
    103109
    104110    QGLPoint*        data() {return vertexArray.data();}
    105     QVector<int>&   stops() {return vertexArrayStops;}
     111    int *stops() const { return vertexArrayStops.data(); }
     112    int stopCount() const { return vertexArrayStops.size(); }
    106113    QGLRect         boundingRect() const;
     114
     115    int vertexCount() const { return vertexArray.size(); }
    107116
    108117    void lineToArray(const GLfloat x, const GLfloat y);
     
    110119private:
    111120    QDataBuffer<QGLPoint> vertexArray;
    112     QVector<int>          vertexArrayStops;
     121    QDataBuffer<int>      vertexArrayStops;
    113122
    114123    GLfloat     maxX;
     
    117126    GLfloat     minY;
    118127    bool        boundingRectDirty;
     128    void addClosingLine(int index);
     129    void addCentroid(const QVectorPath &path, int subPathIndex);
     130};
    119131
    120     inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale);
    121 };
     132QT_END_NAMESPACE
     133
     134#endif
Note: See TracChangeset for help on using the changeset viewer.