TQCanvasEllipse(3qt)

NAME
TQCanvasEllipse - Ellipse or ellipse segment on a TQCanvas

SYNOPSIS
#include <tqcanvas.h>

Inherits TQCanvasPolygonalItem.

  Public Members
TQCanvasEllipse ( TQCanvas * canvas )
TQCanvasEllipse ( int width, int height, TQCanvas * canvas )
TQCanvasEllipse ( int width, int height, int startangle, int angle, TQCanvas * canvas )
~TQCanvasEllipse ()
int width () const
int height () const
void setSize ( int width, int height )
void setAngles ( int start, int length )
int angleStart () const
int angleLength () const
virtual int rtti () const

  Protected Members
virtual void drawShape ( TQPainter & p )

DESCRIPTION
The TQCanvasEllipse class provides an ellipse or ellipse segment on a TQCanvas.

A canvas item that paints an ellipse or ellipse segment with a TQBrush. The ellipse's height, width, start angle and angle length can be set at construction time. The size can be changed at runtime with setSize(), and the angles can be changed (if you're displaying an ellipse segment rather than a whole ellipse) with setAngles().

Note that angles are specified in 16ths of a degree.

<center>
[Image Omitted]

</center>

If a start angle and length angle are set then an ellipse segment will be drawn. The start angle is the angle that goes from zero in a counter-clockwise direction (shown in green in the diagram). The length angle is the angle from the start angle in a counter-clockwise direction (shown in blue in the diagram). The blue segment is the segment of the ellipse that would be drawn. If no start angle and length angle are specified the entire ellipse is drawn.

The ellipse can be drawn on a painter with drawShape().

Like any other canvas item ellipses can be moved with move() and moveBy(), or by setting coordinates with setX(), setY() and setZ().

Note: TQCanvasEllipse does not use the pen.

See also Graphics Classes and Image Processing Classes.

MEMBER FUNCTION DOCUMENTATION

TQCanvasEllipse::TQCanvasEllipse ( TQCanvas * canvas )
Constructs a 32x32 ellipse, centered at (0, 0) on canvas.

TQCanvasEllipse::TQCanvasEllipse ( int width, int height, TQCanvas * canvas )
Constructs a width by height pixel ellipse, centered at (0, 0) on canvas.

TQCanvasEllipse::TQCanvasEllipse ( int width, int height, int startangle, int angle, TQCanvas * canvas )
Constructs a width by height pixel ellipse, centered at (0, 0) on canvas. Only a segment of the ellipse is drawn, starting at angle startangle, and extending for angle angle (the angle length).

Note that angles are specified in <small><sup>1</sup>/<sub>16</sub></small>ths of a degree.

TQCanvasEllipse::~TQCanvasEllipse ()
Destroys the ellipse.

int TQCanvasEllipse::angleLength () const
Returns the length angle (the extent of the ellipse segment) in 16ths of a degree. Initially this will be 360 * 16 (a complete ellipse).

See also setAngles() and angleStart().

int TQCanvasEllipse::angleStart () const
Returns the start angle in 16ths of a degree. Initially this will be 0.

See also setAngles() and angleLength().

void TQCanvasEllipse::drawShape ( TQPainter & p ) [virtual protected]
Draws the ellipse, centered at x(), y() using the painter p.

Note that TQCanvasEllipse does not support an outline (the pen is always NoPen).

Reimplemented from TQCanvasPolygonalItem.

int TQCanvasEllipse::height () const
Returns the height of the ellipse.

int TQCanvasEllipse::rtti () const [virtual]
Returns 6 (TQCanvasItem::Rtti_Ellipse).

See also TQCanvasItem::rtti().

Reimplemented from TQCanvasPolygonalItem.

void TQCanvasEllipse::setAngles ( int start, int length )
Sets the angles for the ellipse. The start angle is start and the extent of the segment is length (the angle length) from the start. The angles are specified in 16ths of a degree. By default the ellipse will start at 0 and have an angle length of 360 * 16 (a complete ellipse).

See also angleStart() and angleLength().

void TQCanvasEllipse::setSize ( int width, int height )
Sets the width and height of the ellipse.

int TQCanvasEllipse::width () const
Returns the width of the ellipse.

SEE ALSO
http://doc.trolltech.com/tqcanvasellipse.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqcanvasellipse.3qt) and the Qt version (3.3.8).