QCanvasPolygon(3qt)
π QCanvasPolygon β bestie edition π
okay so this is the QCanvasPolygon(3qt) manual page, and we're gonna make it make sense. it's giving Qt 3, it's giving canvas graphics, it's giving polygon realness. let's go π¦
β¨ NAME β¨
QCanvasPolygon β a whole polygon, but make it live on a QCanvas π
πΈ SYNOPSIS πΈ
#include <qcanvas.h>
Inherits QCanvasPolygonalItem.
Inherited by QCanvasSpline.
π Public Members
QCanvasPolygon ( QCanvas * canvas )
~QCanvasPolygon ()
void setPoints ( QPointArray pa )
QPointArray points () const
virtual QPointArray areaPoints () const
virtual int rtti () const
π§ Protected Members
virtual void drawShape ( QPainter & p )
π DESCRIPTION π
The QCanvasPolygon class provides a polygon on a QCanvas. no cap, that's the whole job and it does it beautifully.
It paints a polygon with a QBrush. the polygon's points can be set in the constructor, or set or changed later using setPoints(). wanna get them back? use points(). wanna get them relative to the canvas's origin? that's areaPoints()'s moment. β¨
The polygon can be drawn on a painter with drawShape(). iconic.
Like any other canvas item, polygons can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ(). move it around bestie, it's your polygon π
β οΈ Note: QCanvasPolygon does not use the pen. like. at all. the pen is simply not invited to this party π
See also Graphics Classes and Image Processing Classes.
π MEMBER FUNCTION DOCUMENTATION π
QCanvasPolygon::QCanvasPolygon ( QCanvas * canvas )
Constructs a point-less polygon on the canvas canvas. literally zero points, empty, a blank canvas of a canvas item π
You should call setPoints() before using it further. fr fr. do it. it's nothing without points.
QCanvasPolygon::~QCanvasPolygon ()
Destroys the polygon. bye bestie ππ
QPointArray QCanvasPolygon::areaPoints () const [virtual]
Returns the vertices of the polygon translated by the polygon's current x(), y() position β i.e. relative to the canvas's origin. so it's the "where is it actually" version of the points. the main character coordinates π«Ά
See also setPoints() and points().
Reimplemented from QCanvasPolygonalItem.
void QCanvasPolygon::drawShape ( QPainter & p ) [virtual protected]
Draws the polygon using the painter p. slay π
β οΈ Note thatQCanvasPolygondoes not support an outline β the pen is alwaysNoPen. so don't come looking for an outline, it's not there, it never was πΈ
Reimplemented from QCanvasPolygonalItem.
QPointArray QCanvasPolygon::points () const
Returns the vertices of the polygon, not translated by the position. so like, the raw local points, before any moving-around happens. the unedited version, if you will π
See also setPoints() and areaPoints().
int QCanvasPolygon::rtti () const [virtual]
Returns 4 (QCanvasItem::Rtti_Polygon). that's its little ID badge, its vibe check number, its β¨ identity β¨
See also QCanvasItem::rtti().
Reimplemented from QCanvasPolygonalItem.
Reimplemented in QCanvasSpline.
void QCanvasPolygon::setPoints ( QPointArray pa )
Sets the points of the polygon to be pa. these points will have their x and y coordinates automatically translated by x(), y() as the polygon is moved. so you set them once, and the polygon handles the moving math itself. lowkey so convenient π¦
π SEE ALSO π
π 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. (so like, a robot wrote it. respect honestly π€π)
π 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. π«Ά (they're literally begging you to file good bug reports, so give them details, bestie)
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt 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. so like, this is the fan-made version, the HTML is the canon π
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcanvaspolygon.3qt) and the Qt version (3.3.8). include the version!! they will ask!! π
and that's the whole page bestie β¨πππ¦πΈπ π«Άππβ
this little masterpiece dropped on 2 February 2007, brought to you by Trolltech AS, and it's riding with Qt 3.3.8 β ok love u bye ππ§π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms