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
|
'\" t
.TH QCanvasSpline 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
QCanvasSpline \- Multi-bezier splines on a QCanvas
.SH SYNOPSIS
\fC#include <ntqcanvas.h>\fR
.PP
Inherits QCanvasPolygon.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQCanvasSpline\fR ( QCanvas * canvas )"
.br
.ti -1c
.BI "\fB~QCanvasSpline\fR ()"
.br
.ti -1c
.BI "void \fBsetControlPoints\fR ( QPointArray ctrl, bool close = TRUE )"
.br
.ti -1c
.BI "QPointArray \fBcontrolPoints\fR () const"
.br
.ti -1c
.BI "bool \fBclosed\fR () const"
.br
.ti -1c
.BI "virtual int \fBrtti\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QCanvasSpline class provides multi-bezier splines on a QCanvas.
.PP
A QCanvasSpline is a sequence of 4-point bezier curves joined together to make a curved shape.
.PP
You set the control points of the spline with setControlPoints().
.PP
If the bezier is closed(), then the first control point will be re-used as the last control point. Therefore, a closed bezier must have a multiple of 3 control points and an open bezier must have one extra point.
.PP
The beziers are not necessarily joined "smoothly". To ensure this, set control points appropriately (general reference texts about beziers will explain this in detail).
.PP
Like any other canvas item splines 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.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QCanvasSpline::QCanvasSpline ( QCanvas * canvas )"
Create a spline with no control points on the canvas \fIcanvas\fR.
.PP
See also setControlPoints().
.SH "QCanvasSpline::~QCanvasSpline ()"
Destroy the spline.
.SH "bool QCanvasSpline::closed () const"
Returns TRUE if the control points are a closed set; otherwise returns FALSE.
.SH "QPointArray QCanvasSpline::controlPoints () const"
Returns the current set of control points.
.PP
See also setControlPoints() and closed().
.SH "int QCanvasSpline::rtti () const\fC [virtual]\fR"
Returns 8 (QCanvasItem::Rtti_Spline).
.PP
See also QCanvasItem::rtti().
.PP
Reimplemented from QCanvasPolygon.
.SH "void QCanvasSpline::setControlPoints ( QPointArray ctrl, bool close = TRUE )"
Set the spline control points to \fIctrl\fR.
.PP
If \fIclose\fR is TRUE, then the first point in \fIctrl\fR will be re-used as the last point, and the number of control points must be a multiple of 3. If \fIclose\fR is FALSE, one additional control point is required, and the number of control points must be one of (4, 7, 10, 13, ...).
.PP
If the number of control points doesn't meet the above conditions, the number of points will be truncated to the largest number of points that do meet the requirement.
.PP
Example: canvas/canvas.cpp.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qcanvasspline.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 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.
.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 (qcanvasspline.3qt) and the Qt
version (3.3.8).
|