1QCanvasEllipse(3qt)                                        QCanvasEllipse(3qt)
2
3
4

NAME

6       QCanvasEllipse - Ellipse or ellipse segment on a QCanvas
7

SYNOPSIS

9       #include <qcanvas.h>
10
11       Inherits QCanvasPolygonalItem.
12
13   Public Members
14       QCanvasEllipse ( QCanvas * canvas )
15       QCanvasEllipse ( int width, int height, QCanvas * canvas )
16       QCanvasEllipse ( int width, int height, int startangle, int angle,
17           QCanvas * canvas )
18       ~QCanvasEllipse ()
19       int width () const
20       int height () const
21       void setSize ( int width, int height )
22       void setAngles ( int start, int length )
23       int angleStart () const
24       int angleLength () const
25       virtual int rtti () const
26
27   Protected Members
28       virtual void drawShape ( QPainter & p )
29

DESCRIPTION

31       The QCanvasEllipse class provides an ellipse or ellipse segment on a
32       QCanvas.
33
34       A canvas item that paints an ellipse or ellipse segment with a QBrush.
35       The ellipse's height, width, start angle and angle length can be set at
36       construction time. The size can be changed at runtime with setSize(),
37       and the angles can be changed (if you're displaying an ellipse segment
38       rather than a whole ellipse) with setAngles().
39
40       Note that angles are specified in 16ths of a degree.
41
42       <center>
43                                   [Image Omitted]
44
45       </center>
46
47       If a start angle and length angle are set then an ellipse segment will
48       be drawn. The start angle is the angle that goes from zero in a
49       counter-clockwise direction (shown in green in the diagram). The length
50       angle is the angle from the start angle in a counter-clockwise
51       direction (shown in blue in the diagram). The blue segment is the
52       segment of the ellipse that would be drawn. If no start angle and
53       length angle are specified the entire ellipse is drawn.
54
55       The ellipse can be drawn on a painter with drawShape().
56
57       Like any other canvas item ellipses can be moved with move() and
58       moveBy(), or by setting coordinates with setX(), setY() and setZ().
59
60       Note: QCanvasEllipse does not use the pen.
61
62       See also Graphics Classes and Image Processing Classes.
63

MEMBER FUNCTION DOCUMENTATION

QCanvasEllipse::QCanvasEllipse ( QCanvas * canvas )

66       Constructs a 32x32 ellipse, centered at (0, 0) on canvas.
67

QCanvasEllipse::QCanvasEllipse ( int width, int height, QCanvas * canvas )

69       Constructs a width by height pixel ellipse, centered at (0, 0) on
70       canvas.
71

QCanvasEllipse::QCanvasEllipse ( int width, int height, int startangle, int

73       angle, QCanvas * canvas )
74       Constructs a width by height pixel ellipse, centered at (0, 0) on
75       canvas. Only a segment of the ellipse is drawn, starting at angle
76       startangle, and extending for angle angle (the angle length).
77
78       Note that angles are specified in
79       <small><sup>1</sup>/<sub>16</sub></small>ths of a degree.
80

QCanvasEllipse::~QCanvasEllipse ()

82       Destroys the ellipse.
83

int QCanvasEllipse::angleLength () const

85       Returns the length angle (the extent of the ellipse segment) in 16ths
86       of a degree. Initially this will be 360 * 16 (a complete ellipse).
87
88       See also setAngles() and angleStart().
89

int QCanvasEllipse::angleStart () const

91       Returns the start angle in 16ths of a degree. Initially this will be 0.
92
93       See also setAngles() and angleLength().
94

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

96       Draws the ellipse, centered at x(), y() using the painter p.
97
98       Note that QCanvasEllipse does not support an outline (the pen is always
99       NoPen).
100
101       Reimplemented from QCanvasPolygonalItem.
102

int QCanvasEllipse::height () const

104       Returns the height of the ellipse.
105

int QCanvasEllipse::rtti () const [virtual]

107       Returns 6 (QCanvasItem::Rtti_Ellipse).
108
109       See also QCanvasItem::rtti().
110
111       Reimplemented from QCanvasPolygonalItem.
112

void QCanvasEllipse::setAngles ( int start, int length )

114       Sets the angles for the ellipse. The start angle is start and the
115       extent of the segment is length (the angle length) from the start. The
116       angles are specified in 16ths of a degree. By default the ellipse will
117       start at 0 and have an angle length of 360 * 16 (a complete ellipse).
118
119       See also angleStart() and angleLength().
120

void QCanvasEllipse::setSize ( int width, int height )

122       Sets the width and height of the ellipse.
123

int QCanvasEllipse::width () const

125       Returns the width of the ellipse.
126
127

SEE ALSO

129       http://doc.trolltech.com/qcanvasellipse.html
130       http://www.trolltech.com/faq/tech.html
131
133       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
134       license file included in the distribution for a complete license
135       statement.
136

AUTHOR

138       Generated automatically from the source code.
139

BUGS

141       If you find a bug in Qt, please report it as described in
142       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
143       help you. Thank you.
144
145       The definitive Qt documentation is provided in HTML format; it is
146       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
147       web browser. This man page is provided as a convenience for those users
148       who prefer man pages, although this format is not officially supported
149       by Trolltech.
150
151       If you find errors in this manual page, please report them to qt-
152       bugs@trolltech.com.  Please include the name of the manual page
153       (qcanvasellipse.3qt) and the Qt version (3.3.8).
154
155
156
157Trolltech AS                    2 February 2007            QCanvasEllipse(3qt)
Impressum