// qpainterpath.sip generated by MetaSIP on Fri Apr 16 11:32:08 2010
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// Please review the following information to ensure GNU General
// Public Licensing requirements will be met:
// http://trolltech.com/products/qt/licenses/licensing/opensource/. If
// you are unsure which license is appropriate for your use, please
// review the following information:
// http://trolltech.com/products/qt/licenses/licensing/licensingoverview
// or contact the sales department at sales@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%ModuleCode
#include <qpainterpath.h>
%End

class QPainterPath
{

%TypeHeaderCode
#include <qpainterpath.h>
%End

public:
    enum ElementType
    {
        MoveToElement,
        LineToElement,
        CurveToElement,
        CurveToDataElement,
    };

    class Element
    {

%TypeHeaderCode
#include <qpainterpath.h>
%End

    public:
        qreal x;
        qreal y;
        QPainterPath::ElementType type;
        bool isMoveTo() const;
        bool isLineTo() const;
        bool isCurveTo() const;
        bool operator==(const QPainterPath::Element &) const;
%If (Qt_4_2_0 -)
        bool operator!=(const QPainterPath::Element &) const;
%End
        operator QPointF() const;
    };

    QPainterPath();
    explicit QPainterPath(const QPointF &);
    QPainterPath(const QPainterPath &);
    ~QPainterPath();
    void closeSubpath();
    void moveTo(const QPointF &);
    void lineTo(const QPointF &);
    void arcTo(const QRectF &, qreal, qreal);
    void cubicTo(const QPointF &, const QPointF &, const QPointF &);
    void quadTo(const QPointF &, const QPointF &);
    QPointF currentPosition() const;
    void addRect(const QRectF &);
    void addEllipse(const QRectF &);
    void addPolygon(const QPolygonF &);
    void addText(const QPointF &, const QFont &, const QString &);
    void addPath(const QPainterPath &);
    void addRegion(const QRegion &);
    void connectPath(const QPainterPath &);
    bool contains(const QPointF &) const;
    bool contains(const QRectF &) const;
    bool intersects(const QRectF &) const;
    QRectF boundingRect() const;
    QRectF controlPointRect() const;
    Qt::FillRule fillRule() const;
    void setFillRule(Qt::FillRule);
    QPainterPath toReversed() const;
    QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
    QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
    QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
    bool operator==(const QPainterPath &) const;
    bool operator!=(const QPainterPath &) const;
    void moveTo(qreal, qreal);
%If (Qt_4_2_0 -)
    void arcMoveTo(const QRectF &, qreal);
%End
%If (Qt_4_2_0 -)
    void arcMoveTo(qreal, qreal, qreal, qreal, qreal);
%End
    void arcTo(qreal, qreal, qreal, qreal, qreal, qreal);
    void lineTo(qreal, qreal);
    void cubicTo(qreal, qreal, qreal, qreal, qreal, qreal);
    void quadTo(qreal, qreal, qreal, qreal);
    void addEllipse(qreal, qreal, qreal, qreal);
    void addRect(qreal, qreal, qreal, qreal);
    void addText(qreal, qreal, const QFont &, const QString &);
    bool isEmpty() const;
    int elementCount() const;
    const QPainterPath::Element &elementAt(int) const;
%If (Qt_4_2_0 -)
    void setElementPositionAt(int, qreal, qreal);
%End
%If (Qt_4_3_0 -)
    void addRoundRect(const QRectF &, int, int);
%End
%If (Qt_4_3_0 -)
    QList<QPolygonF> toSubpathPolygons(const QTransform &) const;
%End
%If (Qt_4_3_0 -)
    QList<QPolygonF> toFillPolygons(const QTransform &) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF toFillPolygon(const QTransform &) const;
%End
%If (Qt_4_3_0 -)
    qreal length() const;
%End
%If (Qt_4_3_0 -)
    qreal percentAtLength(qreal) const;
%End
%If (Qt_4_3_0 -)
    QPointF pointAtPercent(qreal) const;
%End
%If (Qt_4_3_0 -)
    qreal angleAtPercent(qreal) const;
%End
%If (Qt_4_3_0 -)
    qreal slopeAtPercent(qreal) const;
%End
%If (Qt_4_3_0 -)
    bool intersects(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    bool contains(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    QPainterPath united(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    QPainterPath intersected(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    QPainterPath subtracted(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    QPainterPath subtractedInverted(const QPainterPath &) const;
%End
%If (Qt_4_3_0 -)
    void addRoundRect(qreal, qreal, qreal, qreal, int, int);
%End
%If (Qt_4_3_0 -)
    void addRoundRect(const QRectF &, int);
%End
%If (Qt_4_3_0 -)
    void addRoundRect(qreal, qreal, qreal, qreal, int);
%End
%If (Qt_4_4_0 -)
    void addRoundedRect(const QRectF &, qreal, qreal, Qt::SizeMode mode = Qt::AbsoluteSize);
%End
%If (Qt_4_4_0 -)
    void addRoundedRect(qreal, qreal, qreal, qreal, qreal, qreal, Qt::SizeMode mode = Qt::AbsoluteSize);
%End
%If (Qt_4_4_0 -)
    void addEllipse(const QPointF &, qreal, qreal);
%End
%If (Qt_4_4_0 -)
    QPainterPath simplified() const;
%End
%If (Qt_4_5_0 -)
    QPainterPath operator&(const QPainterPath &) const;
%End
%If (Qt_4_5_0 -)
    QPainterPath operator|(const QPainterPath &) const;
%End
%If (Qt_4_5_0 -)
    QPainterPath operator+(const QPainterPath &) const;
%End
%If (Qt_4_5_0 -)
    QPainterPath operator-(const QPainterPath &) const;
%End
%If (Qt_4_5_0 -)
    QPainterPath &operator&=(const QPainterPath &);
%End
%If (Qt_4_5_0 -)
    QPainterPath &operator|=(const QPainterPath &);
%End
%If (Qt_4_5_0 -)
    QPainterPath &operator+=(const QPainterPath &);
%End
%If (Qt_4_5_0 -)
    QPainterPath &operator-=(const QPainterPath &);
%End
%If (Qt_4_6_0 -)
    void translate(qreal, qreal);
%End
%If (Qt_4_6_0 -)
    QPainterPath translated(qreal, qreal) const;
%End
%If (Qt_4_6_0 -)
    void translate(const QPointF &);
%End
%If (Qt_4_6_0 -)
    QPainterPath translated(const QPointF &) const;
%End
};

QDataStream &operator<<(QDataStream &, const QPainterPath & /Constrained/);
QDataStream &operator>>(QDataStream &, QPainterPath & /Constrained/);

class QPainterPathStroker
{

%TypeHeaderCode
#include <qpainterpath.h>
%End

public:
    QPainterPathStroker();
    ~QPainterPathStroker();
    void setWidth(qreal);
    qreal width() const;
    void setCapStyle(Qt::PenCapStyle);
    Qt::PenCapStyle capStyle() const;
    void setJoinStyle(Qt::PenJoinStyle);
    Qt::PenJoinStyle joinStyle() const;
    void setMiterLimit(qreal);
    qreal miterLimit() const;
    void setCurveThreshold(qreal);
    qreal curveThreshold() const;
    void setDashPattern(Qt::PenStyle);
    void setDashPattern(const QVector<qreal> &);
    QVector<qreal> dashPattern() const;
    QPainterPath createStroke(const QPainterPath &) const;
%If (Qt_4_3_0 -)
    void setDashOffset(qreal);
%End
%If (Qt_4_3_0 -)
    qreal dashOffset() const;
%End

private:
%If (Qt_4_6_0 -)
    QPainterPathStroker(const QPainterPathStroker &);
%End
};
