1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/painting/q3pointarray.cpp -->
7
<title>Qt 4.0: Q3PointArray Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Q3PointArray Class Reference</h1>
21
<pre>#include <Q3PointArray></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
22
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
23
<p>Inherits <a href="qpolygon.html">QPolygon</a>.</p>
25
<li><a href="q3pointarray-members.html">List of all members, including inherited members</a></li>
27
<a name="public-functions"></a>
28
<h3>Public Functions</h3>
30
<li><div class="fn"/><b><a href="q3pointarray.html#Q3PointArray">Q3PointArray</a></b> ()</li>
31
<li><div class="fn"/><b><a href="q3pointarray.html#Q3PointArray-2">Q3PointArray</a></b> ( const QRect & <i>r</i>, bool <i>closed</i> = false )</li>
32
<li><div class="fn"/><b><a href="q3pointarray.html#Q3PointArray-3">Q3PointArray</a></b> ( const QPolygon & <i>other</i> )</li>
33
<li><div class="fn"/>Q3PointArray <b><a href="q3pointarray.html#copy">copy</a></b> () const</li>
34
<li><div class="fn"/>Q3PointArray <b><a href="q3pointarray.html#cubicBezier">cubicBezier</a></b> () const</li>
35
<li><div class="fn"/>bool <b><a href="q3pointarray.html#isNull">isNull</a></b> ()</li>
36
<li><div class="fn"/>void <b><a href="q3pointarray.html#makeArc">makeArc</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, int <i>a1</i>, int <i>a2</i> )</li>
37
<li><div class="fn"/>void <b><a href="q3pointarray.html#makeArc-2">makeArc</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, int <i>a1</i>, int <i>a2</i>, const QMatrix & <i>xf</i> )</li>
38
<li><div class="fn"/>void <b><a href="q3pointarray.html#makeEllipse">makeEllipse</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
41
<li><div class="fn"/>12 public functions inherited from <a href="qpolygon.html#public-functions">QPolygon</a></li>
42
<li><div class="fn"/>62 public functions inherited from <a href="qvector.html#public-functions">QVector</a></li>
44
<h3>Additional Inherited Members</h3>
46
<li><div class="fn"/>2 static public members inherited from <a href="qvector.html#static-public-members">QVector</a></li>
48
<a name="details"></a>
50
<h2>Detailed Description</h2>
51
<p>The Q3PointArray class provides an array of points.</p>
52
<p>Q3PointArray is a <a href="qpolygon.html">QPolygon</a> subclass that provides functions to make it more source compatible with the <tt>QPointArray</tt> class in Qt 3.</p>
53
<p>In Qt 4, we recommend that you use <a href="qpainterpath.html">QPainterPath</a> for representing arcs, ellipses, and Bezier curves, rather than <a href="qpolygon.html">QPolygon</a>.</p>
55
<h2>Member Function Documentation</h2>
56
<h3 class="fn"><a name="Q3PointArray"></a>Q3PointArray::Q3PointArray ()</h3>
57
<p>Constructs an empty <a href="q3pointarray.html">Q3PointArray</a>.</p>
58
<h3 class="fn"><a name="Q3PointArray-2"></a>Q3PointArray::Q3PointArray ( const <a href="qrect.html">QRect</a> & <i>r</i>, bool <i>closed</i> = false )</h3>
59
<p>Constructs a point array from the rectangle <i>r</i>.</p>
60
<p>If <i>closed</i> is false, then the point array just contains the following four points of the rectangle ordered clockwise. The bottom-right point is located at (r.x() + r.width(), r.y() + r.height()).</p>
61
<h3 class="fn"><a name="Q3PointArray-3"></a>Q3PointArray::Q3PointArray ( const <a href="qpolygon.html">QPolygon</a> & <i>other</i> )</h3>
62
<p>Constructs a copy of <i>other</i>.</p>
63
<h3 class="fn"><a name="copy"></a>Q3PointArray Q3PointArray::copy () const</h3>
64
<p>Returns a copy of this <a href="q3pointarray.html">Q3PointArray</a>.</p>
65
<h3 class="fn"><a name="cubicBezier"></a>Q3PointArray Q3PointArray::cubicBezier () const</h3>
66
<p>Returns the Bezier points for the four control points in this array.</p>
67
<h3 class="fn"><a name="isNull"></a>bool Q3PointArray::isNull ()</h3>
68
<p>Same as <a href="qvector.html#isEmpty">isEmpty</a>().</p>
69
<h3 class="fn"><a name="makeArc"></a>void Q3PointArray::makeArc ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, int <i>a1</i>, int <i>a2</i> )</h3>
70
<p>Sets the points of the array to those describing an arc of an ellipse with size, width <i>w</i> by height <i>h</i>, and position (<i>x</i>, <i>y</i>), starting from angle <i>a1</i> and spanning by angle <i>a2</i>. The resulting array has sufficient resolution for pixel accuracy (see the overloaded function which takes an additional <a href="qmatrix.html">QMatrix</a> parameter).</p>
71
<p>Angles are specified in 16ths of a degree, i.e. a full circle equals 5760 (16*360). Positive values mean counter-clockwise, whereas negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
72
<h3 class="fn"><a name="makeArc-2"></a>void Q3PointArray::makeArc ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, int <i>a1</i>, int <i>a2</i>, const <a href="qmatrix.html">QMatrix</a> & <i>xf</i> )</h3>
73
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
74
<p>Sets the points of the array to those describing an arc of an ellipse with width <i>w</i> and height <i>h</i> and position (<i>x</i>, <i>y</i>), starting from angle <i>a1</i>, and spanning angle by <i>a2</i>, and transformed by the matrix <i>xf</i>. The resulting array has sufficient resolution for pixel accuracy.</p>
75
<p>Angles are specified in 16ths of a degree, i.e. a full circle equals 5760 (16 * 360). Positive values mean counter-clockwise, whereas negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
76
<h3 class="fn"><a name="makeEllipse"></a>void Q3PointArray::makeEllipse ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
77
<p>Sets the points of the array to those describing an ellipse with size, width <i>w</i> by height <i>h</i>, and position (<i>x</i>, <i>y</i>).</p>
78
<p>The returned array has sufficient resolution for use as pixels.</p>
79
<p /><address><hr /><div align="center">
80
<table width="100%" cellspacing="0" border="0"><tr class="address">
81
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
82
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
83
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
84
</tr></table></div></address></body>