source: trunk/doc/html/qcanvaspolygon.html

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

reference documentation added

File size: 6.3 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:4134 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QCanvasPolygon 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>QCanvasPolygon Class Reference<br><small>[<a href="canvas.html">canvas module</a>]</small></h1>
33
34<p>The QCanvasPolygon class provides a polygon 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="qcanvaspolygonalitem.html">QCanvasPolygonalItem</a>.
38<p>Inherited by <a href="qcanvasspline.html">QCanvasSpline</a>.
39<p><a href="qcanvaspolygon-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QCanvasPolygon"><b>QCanvasPolygon</b></a> ( QCanvas&nbsp;*&nbsp;canvas )</li>
43<li class=fn><a href="#~QCanvasPolygon"><b>~QCanvasPolygon</b></a> ()</li>
44<li class=fn>void <a href="#setPoints"><b>setPoints</b></a> ( QPointArray&nbsp;pa )</li>
45<li class=fn>QPointArray <a href="#points"><b>points</b></a> () const</li>
46<li class=fn>virtual QPointArray <a href="#areaPoints"><b>areaPoints</b></a> () const</li>
47<li class=fn>virtual int <a href="#rtti"><b>rtti</b></a> () const</li>
48</ul>
49<h2>Protected Members</h2>
50<ul>
51<li class=fn>virtual void <a href="#drawShape"><b>drawShape</b></a> ( QPainter&nbsp;&amp;&nbsp;p )</li>
52</ul>
53<hr><a name="details"></a><h2>Detailed Description</h2>
54
55
56The QCanvasPolygon class provides a polygon on a <a href="qcanvas.html">QCanvas</a>.
57
58<p>
59
60
61<p> Paints a polygon with a <a href="qbrush.html">QBrush</a>. The polygon's points can be set in
62the constructor or set or changed later using <a href="#setPoints">setPoints</a>(). Use
63<a href="#points">points</a>() to retrieve the points, or <a href="#areaPoints">areaPoints</a>() to retrieve the
64points relative to the canvas's origin.
65<p> The polygon can be drawn on a painter with <a href="#drawShape">drawShape</a>().
66<p> Like any other canvas item polygons 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> Note: QCanvasPolygon does not use the pen.
71<p>See also <a href="graphics.html">Graphics Classes</a> and <a href="images.html">Image Processing Classes</a>.
72
73<hr><h2>Member Function Documentation</h2>
74<h3 class=fn><a name="QCanvasPolygon"></a>QCanvasPolygon::QCanvasPolygon ( <a href="qcanvas.html">QCanvas</a>&nbsp;*&nbsp;canvas )
75</h3>
76Constructs a point-less polygon on the canvas <em>canvas</em>. You
77should call <a href="#setPoints">setPoints</a>() before using it further.
78
79<h3 class=fn><a name="~QCanvasPolygon"></a>QCanvasPolygon::~QCanvasPolygon ()
80</h3>
81Destroys the polygon.
82
83<h3 class=fn><a href="qpointarray.html">QPointArray</a> <a name="areaPoints"></a>QCanvasPolygon::areaPoints () const<tt> [virtual]</tt>
84</h3>
85Returns the vertices of the polygon translated by the polygon's
86current <a href="qcanvasitem.html#x">x</a>(), <a href="qcanvasitem.html#y">y</a>() position, i.e. relative to the canvas's origin.
87<p> <p>See also <a href="#setPoints">setPoints</a>() and <a href="#points">points</a>().
88
89<p>Reimplemented from <a href="qcanvaspolygonalitem.html#areaPoints">QCanvasPolygonalItem</a>.
90<h3 class=fn>void <a name="drawShape"></a>QCanvasPolygon::drawShape ( <a href="qpainter.html">QPainter</a>&nbsp;&amp;&nbsp;p )<tt> [virtual protected]</tt>
91</h3>
92Draws the polygon using the painter <em>p</em>.
93<p> Note that QCanvasPolygon does not support an outline (the pen is
94always NoPen).
95
96<p>Reimplemented from <a href="qcanvaspolygonalitem.html#drawShape">QCanvasPolygonalItem</a>.
97<h3 class=fn><a href="qpointarray.html">QPointArray</a> <a name="points"></a>QCanvasPolygon::points () const
98</h3>
99
100<p> Returns the vertices of the polygon, not translated by the position.
101<p> <p>See also <a href="#setPoints">setPoints</a>() and <a href="#areaPoints">areaPoints</a>().
102
103<h3 class=fn>int <a name="rtti"></a>QCanvasPolygon::rtti () const<tt> [virtual]</tt>
104</h3>
105Returns 4 (QCanvasItem::Rtti_Polygon).
106<p> <p>See also <a href="qcanvasitem.html#rtti">QCanvasItem::rtti</a>().
107
108<p>Reimplemented from <a href="qcanvaspolygonalitem.html#rtti">QCanvasPolygonalItem</a>.
109<p>Reimplemented in <a href="qcanvasspline.html#rtti">QCanvasSpline</a>.
110<h3 class=fn>void <a name="setPoints"></a>QCanvasPolygon::setPoints ( <a href="qpointarray.html">QPointArray</a>&nbsp;pa )
111</h3>
112Sets the points of the polygon to be <em>pa</em>. These points will have
113their x and y coordinates automatically translated by <a href="qcanvasitem.html#x">x</a>(), <a href="qcanvasitem.html#y">y</a>() as
114the polygon is moved.
115
116<!-- eof -->
117<hr><p>
118This file is part of the <a href="index.html">Qt toolkit</a>.
119Copyright &copy; 1995-2007
120<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
121<table width=100% cellspacing=0 border=0><tr>
122<td>Copyright &copy; 2007
123<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
124<td align=right><div align=right>Qt 3.3.8</div>
125</table></div></address></body>
126</html>
Note: See TracBrowser for help on using the repository browser.