You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
3.9 KiB
103 lines
3.9 KiB
'\" 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 ( 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 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 "QPointArray 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 ( 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/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 qt-bugs@trolltech.com .
|
|
Please include the name of the manual page (tqcanvasspline.3qt) and the Qt
|
|
version (3.3.8).
|