summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqcanvasspline.3qt
blob: 700d376edb38cda29571e2d41aa185fdea059a8d (plain)
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 TQCanvasSpline 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
TQCanvasSpline \- Multi-bezier splines on a TQCanvas
.SH SYNOPSIS
\fC#include <tqcanvas.h>\fR
.PP
Inherits TQCanvasPolygon.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQCanvasSpline\fR ( TQCanvas * canvas )"
.br
.ti -1c
.BI "\fB~TQCanvasSpline\fR ()"
.br
.ti -1c
.BI "void \fBsetControlPoints\fR ( TQPointArray ctrl, bool close = TRUE )"
.br
.ti -1c
.BI "TQPointArray \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 TQCanvasSpline class provides multi-bezier splines on a TQCanvas.
.PP
A TQCanvasSpline 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 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 "TQCanvasSpline::TQCanvasSpline ( TQCanvas * canvas )"
Create a spline with no control points on the canvas \fIcanvas\fR.
.PP
See also setControlPoints().
.SH "TQCanvasSpline::~TQCanvasSpline ()"
Destroy the spline.
.SH "bool TQCanvasSpline::closed () const"
Returns TRUE if the control points are a closed set; otherwise returns FALSE.
.SH "TQPointArray TQCanvasSpline::controlPoints () const"
Returns the current set of control points.
.PP
See also setControlPoints() and closed().
.SH "int TQCanvasSpline::rtti () const\fC [virtual]\fR"
Returns 8 (TQCanvasItem::Rtti_Spline).
.PP
See also TQCanvasItem::rtti().
.PP
Reimplemented from TQCanvasPolygon.
.SH "void TQCanvasSpline::setControlPoints ( TQPointArray 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/tqcanvasspline.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 [email protected] .
Please include the name of the manual page (tqcanvasspline.3qt) and the Qt
version (3.3.8).