1QCanvasPolygon(3qt)                                        QCanvasPolygon(3qt)
2
3
4

NAME

6       QCanvasPolygon - Polygon on a QCanvas
7

SYNOPSIS

9       #include <qcanvas.h>
10
11       Inherits QCanvasPolygonalItem.
12
13       Inherited by QCanvasSpline.
14
15   Public Members
16       QCanvasPolygon ( QCanvas * canvas )
17       ~QCanvasPolygon ()
18       void setPoints ( QPointArray pa )
19       QPointArray points () const
20       virtual QPointArray areaPoints () const
21       virtual int rtti () const
22
23   Protected Members
24       virtual void drawShape ( QPainter & p )
25

DESCRIPTION

27       The QCanvasPolygon class provides a polygon on a QCanvas.
28
29       Paints a polygon with a QBrush. The polygon's points can be set in the
30       constructor or set or changed later using setPoints(). Use points() to
31       retrieve the points, or areaPoints() to retrieve the points relative to
32       the canvas's origin.
33
34       The polygon can be drawn on a painter with drawShape().
35
36       Like any other canvas item polygons can be moved with
37       QCanvasItem::move() and QCanvasItem::moveBy(), or by setting
38       coordinates with QCanvasItem::setX(), QCanvasItem::setY() and
39       QCanvasItem::setZ().
40
41       Note: QCanvasPolygon does not use the pen.
42
43       See also Graphics Classes and Image Processing Classes.
44

MEMBER FUNCTION DOCUMENTATION

QCanvasPolygon::QCanvasPolygon ( QCanvas * canvas )

47       Constructs a point-less polygon on the canvas canvas. You should call
48       setPoints() before using it further.
49

QCanvasPolygon::~QCanvasPolygon ()

51       Destroys the polygon.
52

QPointArray QCanvasPolygon::areaPoints () const [virtual]

54       Returns the vertices of the polygon translated by the polygon's current
55       x(), y() position, i.e. relative to the canvas's origin.
56
57       See also setPoints() and points().
58
59       Reimplemented from QCanvasPolygonalItem.
60

void QCanvasPolygon::drawShape ( QPainter & p ) [virtual protected]

62       Draws the polygon using the painter p.
63
64       Note that QCanvasPolygon does not support an outline (the pen is always
65       NoPen).
66
67       Reimplemented from QCanvasPolygonalItem.
68

QPointArray QCanvasPolygon::points () const

70       Returns the vertices of the polygon, not translated by the position.
71
72       See also setPoints() and areaPoints().
73

int QCanvasPolygon::rtti () const [virtual]

75       Returns 4 (QCanvasItem::Rtti_Polygon).
76
77       See also QCanvasItem::rtti().
78
79       Reimplemented from QCanvasPolygonalItem.
80
81       Reimplemented in QCanvasSpline.
82

void QCanvasPolygon::setPoints ( QPointArray pa )

84       Sets the points of the polygon to be pa. These points will have their x
85       and y coordinates automatically translated by x(), y() as the polygon
86       is moved.
87
88

SEE ALSO

90       http://doc.trolltech.com/qcanvaspolygon.html
91       http://www.trolltech.com/faq/tech.html
92
94       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
95       license file included in the distribution for a complete license
96       statement.
97

AUTHOR

99       Generated automatically from the source code.
100

BUGS

102       If you find a bug in Qt, please report it as described in
103       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
104       help you. Thank you.
105
106       The definitive Qt documentation is provided in HTML format; it is
107       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
108       web browser. This man page is provided as a convenience for those users
109       who prefer man pages, although this format is not officially supported
110       by Trolltech.
111
112       If you find errors in this manual page, please report them to qt-
113       bugs@trolltech.com.  Please include the name of the manual page
114       (qcanvaspolygon.3qt) and the Qt version (3.3.8).
115
116
117
118Trolltech AS                    2 February 2007            QCanvasPolygon(3qt)
Impressum