diff options
Diffstat (limited to 'doc/man/man3/tqcanvasspline.3qt')
-rw-r--r-- | doc/man/man3/tqcanvasspline.3qt | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/doc/man/man3/tqcanvasspline.3qt b/doc/man/man3/tqcanvasspline.3qt new file mode 100644 index 000000000..4a4df1313 --- /dev/null +++ b/doc/man/man3/tqcanvasspline.3qt @@ -0,0 +1,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 [email protected] . +Please include the name of the manual page (tqcanvasspline.3qt) and the Qt +version (3.3.8). |