1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
'\" t
.TH TQCanvasRectangle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQCanvasRectangle \- Rectangle on a TQCanvas
.SH SYNOPSIS
\fC#include <tqcanvas.h>\fR
.PP
Inherits TQCanvasPolygonalItem.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQCanvasRectangle\fR ( TQCanvas * canvas )"
.br
.ti -1c
.BI "\fBTQCanvasRectangle\fR ( const TQRect & r, TQCanvas * canvas )"
.br
.ti -1c
.BI "\fBTQCanvasRectangle\fR ( int x, int y, int width, int height, TQCanvas * canvas )"
.br
.ti -1c
.BI "\fB~TQCanvasRectangle\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 "TQSize \fBsize\fR () const"
.br
.ti -1c
.BI "TQRect \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 ( TQPainter & p )"
.br
.ti -1c
.BI "virtual TQPointArray \fBchunks\fR () const"
.br
.in -1c
.SH DESCRIPTION
The TQCanvasRectangle class provides a rectangle on a TQCanvas.
.PP
This item paints a single rectangle which may have any pen() and brush(), but may not be tilted/rotated. For rotated rectangles, use TQCanvasPolygon.
.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 TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and TQCanvasItem::setZ().
.PP
See also Graphics Classes and Image Processing Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQCanvasRectangle::TQCanvasRectangle ( TQCanvas * canvas )"
Constructs a rectangle at position (0,0) with both width and height set to 32 pixels on \fIcanvas\fR.
.SH "TQCanvasRectangle::TQCanvasRectangle ( const TQRect & r, TQCanvas * canvas )"
Constructs a rectangle positioned and sized by \fIr\fR on \fIcanvas\fR.
.SH "TQCanvasRectangle::TQCanvasRectangle ( int x, int y, int width, int height, TQCanvas * canvas )"
Constructs a rectangle at position (\fIx\fR, \fIy\fR) and size \fIwidth\fR by \fIheight\fR, on \fIcanvas\fR.
.SH "TQCanvasRectangle::~TQCanvasRectangle ()"
Destroys the rectangle.
.SH "TQPointArray TQCanvasRectangle::chunks () const\fC [virtual protected]\fR"
Simply calls TQCanvasItem::chunks().
.SH "void TQCanvasRectangle::drawShape ( TQPainter & p )\fC [virtual protected]\fR"
Draws the rectangle on painter \fIp\fR.
.PP
Example: canvas/canvas.cpp.
.PP
Reimplemented from TQCanvasPolygonalItem.
.SH "int TQCanvasRectangle::height () const"
Returns the height of the rectangle.
.SH "TQRect TQCanvasRectangle::rect () const"
Returns the integer-converted x(), y() position and size() of the rectangle as a TQRect.
.SH "int TQCanvasRectangle::rtti () const\fC [virtual]\fR"
Returns 5 (TQCanvasItem::Rtti_Rectangle).
.PP
See also TQCanvasItem::rtti().
.PP
Reimplemented from TQCanvasPolygonalItem.
.SH "void TQCanvasRectangle::setSize ( int width, int height )"
Sets the \fIwidth\fR and \fIheight\fR of the rectangle.
.SH "TQSize TQCanvasRectangle::size () const"
Returns the width() and height() of the rectangle.
.PP
See also rect() and setSize().
.SH "int TQCanvasRectangle::width () const"
Returns the width of the rectangle.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqcanvasrectangle.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
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.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqcanvasrectangle.3qt) and the Qt
version (3.3.8).
|