.BI "\fBQCanvasRectangle\fR ( int x, int y, int width, int height, QCanvas * canvas )"
.br
.ti -1c
.BI "\fB~QCanvasRectangle\fR ()"
.br
.ti -1c
.BI "int \fBwidth\fR () const"
.br
.ti -1c
.BI "int \fBheight\fR () const"
.br
.ti -1c
.BI "void \fBsetSize\fR ( int width, int height )"
.br
.ti -1c
.BI "QSize \fBsize\fR () const"
.br
.ti -1c
.BI "QRect \fBrect\fR () const"
.br
.ti -1c
.BI "virtual int \fBrtti\fR () const"
.br
.in -1c
.SS "Protected Members"
.in +1c
.ti -1c
.BI "virtual void \fBdrawShape\fR ( QPainter & p )"
.br
.ti -1c
.BI "virtual QPointArray \fBchunks\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QCanvasRectangle class provides a rectangle on a QCanvas.
.PP
This item paints a single rectangle which may have any pen() and brush(), but may not be tilted/rotated. For rotated rectangles, use QCanvasPolygon.
.PP
The rectangle's size and initial position can be set in the constructor. The size can be set or changed later using setSize(). Use height() and width() to retrieve the rectangle's dimensions.
.PP
The rectangle can be drawn on a painter with drawShape().
.PP
Like any other canvas item rectangles can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ().
.PP
See also Graphics Classes and Image Processing Classes.