source: trunk/doc/html/qcanvasspline.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 5.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/canvas/qcanvas.cpp:4227 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QCanvasSpline Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QCanvasSpline Class Reference<br><small>[<a href="canvas.html">canvas module</a>]</small></h1>
33
34<p>The QCanvasSpline class provides multi-bezier splines on a QCanvas.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qcanvas-h.html">qcanvas.h</a>&gt;</tt>
37<p>Inherits <a href="qcanvaspolygon.html">QCanvasPolygon</a>.
38<p><a href="qcanvasspline-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QCanvasSpline"><b>QCanvasSpline</b></a> ( QCanvas&nbsp;*&nbsp;canvas )</li>
42<li class=fn><a href="#~QCanvasSpline"><b>~QCanvasSpline</b></a> ()</li>
43<li class=fn>void <a href="#setControlPoints"><b>setControlPoints</b></a> ( QPointArray&nbsp;ctrl, bool&nbsp;close = TRUE )</li>
44<li class=fn>QPointArray <a href="#controlPoints"><b>controlPoints</b></a> () const</li>
45<li class=fn>bool <a href="#closed"><b>closed</b></a> () const</li>
46<li class=fn>virtual int <a href="#rtti"><b>rtti</b></a> () const</li>
47</ul>
48<hr><a name="details"></a><h2>Detailed Description</h2>
49
50
51The QCanvasSpline class provides multi-bezier splines on a <a href="qcanvas.html">QCanvas</a>.
52
53<p>
54
55
56<p> A QCanvasSpline is a sequence of 4-point bezier curves joined
57together to make a curved shape.
58<p> You set the control points of the spline with <a href="#setControlPoints">setControlPoints</a>().
59<p> If the bezier is <a href="#closed">closed</a>(), then the first control point will be
60re-used as the last control point. Therefore, a closed bezier must
61have a multiple of 3 control points and an open bezier must have
62one extra point.
63<p> The beziers are not necessarily joined "smoothly". To ensure this,
64set control points appropriately (general reference texts about
65beziers will explain this in detail).
66<p> Like any other canvas item splines can be moved with
67<a href="qcanvasitem.html#move">QCanvasItem::move</a>() and <a href="qcanvasitem.html#moveBy">QCanvasItem::moveBy</a>(), or by setting
68coordinates with <a href="qcanvasitem.html#setX">QCanvasItem::setX</a>(), <a href="qcanvasitem.html#setY">QCanvasItem::setY</a>() and
69<a href="qcanvasitem.html#setZ">QCanvasItem::setZ</a>().
70<p> <p>See also <a href="graphics.html">Graphics Classes</a> and <a href="images.html">Image Processing Classes</a>.
71
72<hr><h2>Member Function Documentation</h2>
73<h3 class=fn><a name="QCanvasSpline"></a>QCanvasSpline::QCanvasSpline ( <a href="qcanvas.html">QCanvas</a>&nbsp;*&nbsp;canvas )
74</h3>
75Create a spline with no control points on the canvas <em>canvas</em>.
76<p> <p>See also <a href="#setControlPoints">setControlPoints</a>().
77
78<h3 class=fn><a name="~QCanvasSpline"></a>QCanvasSpline::~QCanvasSpline ()
79</h3>
80Destroy the spline.
81
82<h3 class=fn>bool <a name="closed"></a>QCanvasSpline::closed () const
83</h3>
84Returns TRUE if the control points are a closed set; otherwise
85returns FALSE.
86
87<h3 class=fn><a href="qpointarray.html">QPointArray</a> <a name="controlPoints"></a>QCanvasSpline::controlPoints () const
88</h3>
89Returns the current set of control points.
90<p> <p>See also <a href="#setControlPoints">setControlPoints</a>() and <a href="#closed">closed</a>().
91
92<h3 class=fn>int <a name="rtti"></a>QCanvasSpline::rtti () const<tt> [virtual]</tt>
93</h3>
94Returns 8 (QCanvasItem::Rtti_Spline).
95<p> <p>See also <a href="qcanvasitem.html#rtti">QCanvasItem::rtti</a>().
96
97<p>Reimplemented from <a href="qcanvaspolygon.html#rtti">QCanvasPolygon</a>.
98<h3 class=fn>void <a name="setControlPoints"></a>QCanvasSpline::setControlPoints ( <a href="qpointarray.html">QPointArray</a>&nbsp;ctrl, bool&nbsp;close = TRUE )
99</h3>
100Set the spline control points to <em>ctrl</em>.
101<p> If <em>close</em> is TRUE, then the first point in <em>ctrl</em> will be
102re-used as the last point, and the number of control points must
103be a multiple of 3. If <em>close</em> is FALSE, one additional control
104point is required, and the number of control points must be one of
105(4, 7, 10, 13, ...).
106<p> If the number of control points doesn't meet the above conditions,
107the number of points will be truncated to the largest number of
108points that do meet the requirement.
109
110<p>Example: <a href="canvas-example.html#x2926">canvas/canvas.cpp</a>.
111<!-- eof -->
112<hr><p>
113This file is part of the <a href="index.html">Qt toolkit</a>.
114Copyright &copy; 1995-2007
115<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
116<table width=100% cellspacing=0 border=0><tr>
117<td>Copyright &copy; 2007
118<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
119<td align=right><div align=right>Qt 3.3.8</div>
120</table></div></address></body>
121</html>
Note: See TracBrowser for help on using the repository browser.