<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>TQCanvasPolygonalItem Class Reference<br><small>[<ahref="canvas.html">canvas module</a>]</small></h1>
<p>The TQCanvasPolygonalItem class provides a polygonal canvas item
<p>Inherited by <ahref="qcanvasrectangle.html">TQCanvasRectangle</a>, <ahref="qcanvaspolygon.html">TQCanvasPolygon</a>, <ahref="qcanvasline.html">TQCanvasLine</a>, and <ahref="qcanvasellipse.html">TQCanvasEllipse</a>.
<p><ahref="qcanvaspolygonalitem-members.html">List of all member functions.</a>
overestimate it can be easy and tquick, while still getting almost
all of TQCanvasPolygonalItem's speed.
<p> Note that all subclasses <em>must</em> call <ahref="qcanvasitem.html#hide">hide</a>() in their destructor
since hide() needs to be able to access <ahref="#areaPoints">areaPoints</a>().
<p> Normally, TQCanvasPolygonalItem uses the odd-even algorithm for
determining whether an object intersects this object. You can
change this to the winding algorithm using <ahref="#setWinding">setWinding</a>().
<p> The bounding rectangle is available using <ahref="#boundingRect">boundingRect</a>(). The
points bounding the polygonal item are retrieved with
areaPoints(). Use <ahref="#areaPointsAdvanced">areaPointsAdvanced</a>() to retrieve the bounding
points the polygonal item <em>will</em> have after
<ahref="qcanvasitem.html#advance">TQCanvasItem::advance</a>(1) has been called.
<p> If the shape of the polygonal item is about to change while the
item is visible, call <ahref="#invalidate">invalidate</a>() before updating with a
different result from <ahref="#areaPoints">areaPoints</a>().
<p> By default, TQCanvasPolygonalItem objects have a black pen and no
brush (the default <ahref="qpen.html">TQPen</a> and <ahref="qbrush.html">TQBrush</a> constructors). You can change
this with <ahref="#setPen">setPen</a>() and <ahref="#setBrush">setBrush</a>(), but note that some
TQCanvasPolygonalItem subclasses only use the brush, ignoring the
pen setting.
<p> The polygonal item can be drawn on a painter with <ahref="#draw">draw</a>().
Subclasses must reimplement <ahref="#drawShape">drawShape</a>() to draw themselves.
<p> Like any other canvas item polygonal items can be moved with
<ahref="qcanvasitem.html#move">TQCanvasItem::move</a>() and <ahref="qcanvasitem.html#moveBy">TQCanvasItem::moveBy</a>(), or by setting coordinates
with <ahref="qcanvasitem.html#setX">TQCanvasItem::setX</a>(), <ahref="qcanvasitem.html#setY">TQCanvasItem::setY</a>() and <ahref="qcanvasitem.html#setZ">TQCanvasItem::setZ</a>().
<p><p>See also <ahref="graphics.html">Graphics Classes</a> and <ahref="images.html">Image Processing Classes</a>.
<p> Subclasses must reimplement this function to draw their shape. The
pen and brush of <em>p</em> are already set to <ahref="#pen">pen</a>() and <ahref="#brush">brush</a>() prior
to calling this function.
<p><b>Warning:</b> When you reimplement this function, make sure that you
leave the painter in the same state as you found it. For example,
if you start by calling <ahref="qpainter.html#translate">TQPainter::translate</a>(50, 50), end your
code by calling TQPainter::translate(-50, -50). Be also aware that
the painter might already have some transformations set (i.e.,
don't call <ahref="qpainter.html#resetXForm">TQPainter::resetXForm</a>() when you're done).
<p><p>See also <ahref="#draw">draw</a>().
<p>Reimplemented in <ahref="qcanvasrectangle.html#drawShape">TQCanvasRectangle</a>, <ahref="qcanvaspolygon.html#drawShape">TQCanvasPolygon</a>, and <ahref="qcanvasellipse.html#drawShape">TQCanvasEllipse</a>.
<p><p>See also <ahref="qcanvasitem.html#rtti">TQCanvasItem::rtti</a>().
<p>Reimplemented from <ahref="qcanvasitem.html#rtti">TQCanvasItem</a>.
<p>Reimplemented in <ahref="qcanvasrectangle.html#rtti">TQCanvasRectangle</a>, <ahref="qcanvaspolygon.html#rtti">TQCanvasPolygon</a>, <ahref="qcanvasline.html#rtti">TQCanvasLine</a>, and <ahref="qcanvasellipse.html#rtti">TQCanvasEllipse</a>.