Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 913

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPainterPathStroker Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPainterPathStroker Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPainterPathStroker class is used to generate fillable
outlines for a given painter path. <a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qpainterpathstroker.html#QPainterPathStroker">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.PenCapStyle <b><a href="qpainterpathstroker.html#capStyle">capStyle</a></b> (<i>self</i>)</li><li><div class="fn" />QPainterPath <b><a href="qpainterpathstroker.html#createStroke">createStroke</a></b> (<i>self</i>, QPainterPath&#160;<i>path</i>)</li><li><div class="fn" />float <b><a href="qpainterpathstroker.html#curveThreshold">curveThreshold</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpainterpathstroker.html#dashOffset">dashOffset</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-float <b><a href="qpainterpathstroker.html#dashPattern">dashPattern</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.PenJoinStyle <b><a href="qpainterpathstroker.html#joinStyle">joinStyle</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpainterpathstroker.html#miterLimit">miterLimit</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setCapStyle">setCapStyle</a></b> (<i>self</i>, Qt.PenCapStyle&#160;<i>style</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setCurveThreshold">setCurveThreshold</a></b> (<i>self</i>, float&#160;<i>threshold</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setDashOffset">setDashOffset</a></b> (<i>self</i>, float&#160;<i>offset</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setDashPattern">setDashPattern</a></b> (<i>self</i>, Qt.PenStyle)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setDashPattern-2">setDashPattern</a></b> (<i>self</i>, list-of-float&#160;<i>dashPattern</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setJoinStyle">setJoinStyle</a></b> (<i>self</i>, Qt.PenJoinStyle&#160;<i>style</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setMiterLimit">setMiterLimit</a></b> (<i>self</i>, float&#160;<i>length</i>)</li><li><div class="fn" /><b><a href="qpainterpathstroker.html#setWidth">setWidth</a></b> (<i>self</i>, float&#160;<i>width</i>)</li><li><div class="fn" />float <b><a href="qpainterpathstroker.html#width">width</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPainterPathStroker class is used to generate fillable
outlines for a given painter path.</p>
<p>By calling the <a href="qpainterpathstroker.html#createStroke">createStroke</a>()
function, passing a given <a href="qpainterpath.html">QPainterPath</a> as argument, a new painter
path representing the outline of the given path is created. The
newly created painter path can then be filled to draw the original
painter path's outline.</p>
<p>You can control the various design aspects (width, cap styles,
join styles and dash pattern) of the outlining using the following
functions:</p>
<ul>
<li><a href="qpainterpathstroker.html#setWidth">setWidth</a>()</li>
<li><a href="qpainterpathstroker.html#setCapStyle">setCapStyle</a>()</li>
<li><a href="qpainterpathstroker.html#setJoinStyle">setJoinStyle</a>()</li>
<li><a href="qpainterpathstroker.html#setDashPattern">setDashPattern</a>()</li>
</ul>
<p>The <a href="qpainterpathstroker.html#setDashPattern">setDashPattern</a>()
function accepts both a <a href="qt.html#PenStyle-enum">Qt.PenStyle</a> object and a vector
representation of the pattern as argument.</p>
<p>In addition you can specify a curve's threshold, controlling the
granularity with which a curve is drawn, using the <a href="qpainterpathstroker.html#setCurveThreshold">setCurveThreshold</a>()
function. The default threshold is a well adjusted value (0.25),
and normally you should not need to modify it. However, you can
make the curve's appearance smoother by decreasing its value.</p>
<p>You can also control the miter limit for the generated outline
using the <a href="qpainterpathstroker.html#setMiterLimit">setMiterLimit</a>()
function. The miter limit describes how far from each join the
miter join can extend. The limit is specified in the units of width
so the pixelwise miter limit will be <tt>miterlimit * width</tt>.
This value is only used if the join style is <a href="qt.html#PenJoinStyle-enum">Qt.MiterJoin</a>.</p>
<p>The painter path generated by the <a href="qpainterpathstroker.html#createStroke">createStroke</a>() function
should only be used for outlining the given painter path. Otherwise
it may cause unexpected behavior. Generated outlines also require
the <a href="qt.html#FillRule-enum">Qt.WindingFill</a> rule which
is set by default.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPainterPathStroker" />QPainterPathStroker.__init__ (<i>self</i>)</h3><p>Creates a new stroker.</p>


<h3 class="fn"><a name="capStyle" /><a href="qt.html#PenCapStyle-enum">Qt.PenCapStyle</a> QPainterPathStroker.capStyle (<i>self</i>)</h3><p>Returns the cap style of the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setCapStyle">setCapStyle</a>().</p>


<h3 class="fn"><a name="createStroke" /><a href="qpainterpath.html">QPainterPath</a> QPainterPathStroker.createStroke (<i>self</i>, <a href="qpainterpath.html">QPainterPath</a>&#160;<i>path</i>)</h3><p>Generates a new path that is a fillable area representing the
outline of the given <i>path</i>.</p>
<p>The various design aspects of the outline are based on the
stroker's properties: <a href="qpainterpathstroker.html#width">width</a>(), <a href="qpainterpathstroker.html#capStyle">capStyle</a>(), <a href="qpainterpathstroker.html#joinStyle">joinStyle</a>(), <a href="qpainterpathstroker.html#dashPattern">dashPattern</a>(), <a href="qpainterpathstroker.html#curveThreshold">curveThreshold</a>() and
<a href="qpainterpathstroker.html#miterLimit">miterLimit</a>().</p>
<p>The generated path should only be used for outlining the given
painter path. Otherwise it may cause unexpected behavior. Generated
outlines also require the <a href="qt.html#FillRule-enum">Qt.WindingFill</a> rule which is set by
default.</p>


<h3 class="fn"><a name="curveThreshold" />float QPainterPathStroker.curveThreshold (<i>self</i>)</h3><p>Returns the curve flattening threshold for the generated
outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setCurveThreshold">setCurveThreshold</a>().</p>


<h3 class="fn"><a name="dashOffset" />float QPainterPathStroker.dashOffset (<i>self</i>)</h3><p>Returns the dash offset for the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setDashOffset">setDashOffset</a>().</p>


<h3 class="fn"><a name="dashPattern" />list-of-float QPainterPathStroker.dashPattern (<i>self</i>)</h3><p>Returns the dash pattern for the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setDashPattern">setDashPattern</a>().</p>


<h3 class="fn"><a name="joinStyle" /><a href="qt.html#PenJoinStyle-enum">Qt.PenJoinStyle</a> QPainterPathStroker.joinStyle (<i>self</i>)</h3><p>Returns the join style of the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setJoinStyle">setJoinStyle</a>().</p>


<h3 class="fn"><a name="miterLimit" />float QPainterPathStroker.miterLimit (<i>self</i>)</h3><p>Returns the miter limit for the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setMiterLimit">setMiterLimit</a>().</p>


<h3 class="fn"><a name="setCapStyle" />QPainterPathStroker.setCapStyle (<i>self</i>, <a href="qt.html#PenCapStyle-enum">Qt.PenCapStyle</a>&#160;<i>style</i>)</h3><p>Sets the cap style of the generated outlines to <i>style</i>. If
a dash pattern is set, each segment of the pattern is subject to
the cap <i>style</i>.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#capStyle">capStyle</a>().</p>


<h3 class="fn"><a name="setCurveThreshold" />QPainterPathStroker.setCurveThreshold (<i>self</i>, float&#160;<i>threshold</i>)</h3><p>Specifies the curve flattening <i>threshold</i>, controlling the
granularity with which the generated outlines' curve is drawn.</p>
<p>The default threshold is a well adjusted value (0.25), and
normally you should not need to modify it. However, you can make
the curve's appearance smoother by decreasing its value.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#curveThreshold">curveThreshold</a>().</p>


<h3 class="fn"><a name="setDashOffset" />QPainterPathStroker.setDashOffset (<i>self</i>, float&#160;<i>offset</i>)</h3><p>Sets the dash offset for the generated outlines to
<i>offset</i>.</p>
<p>See the documentation for <a href="qpen.html#setDashOffset">QPen.setDashOffset</a>() for a
description of the dash offset.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#dashOffset">dashOffset</a>().</p>


<h3 class="fn"><a name="setDashPattern" />QPainterPathStroker.setDashPattern (<i>self</i>, <a href="qt.html#PenStyle-enum">Qt.PenStyle</a>)</h3><p>Sets the dash pattern for the generated outlines to
<i>style</i>.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#dashPattern">dashPattern</a>().</p>


<h3 class="fn"><a name="setDashPattern-2" />QPainterPathStroker.setDashPattern (<i>self</i>, list-of-float&#160;<i>dashPattern</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the dash pattern for the generated outlines to
<i>dashPattern</i>. This function makes it possible to specify
custom dash patterns.</p>
<p>Each element in the vector contains the lengths of the dashes
and spaces in the stroke, beginning with the first dash in the
first element, the first space in the second element, and
alternating between dashes and spaces for each following pair of
elements.</p>
<p>The vector can contain an odd number of elements, in which case
the last element will be extended by the length of the first
element when the pattern repeats.</p>


<h3 class="fn"><a name="setJoinStyle" />QPainterPathStroker.setJoinStyle (<i>self</i>, <a href="qt.html#PenJoinStyle-enum">Qt.PenJoinStyle</a>&#160;<i>style</i>)</h3><p>Sets the join style of the generated outlines to
<i>style</i>.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#joinStyle">joinStyle</a>().</p>


<h3 class="fn"><a name="setMiterLimit" />QPainterPathStroker.setMiterLimit (<i>self</i>, float&#160;<i>length</i>)</h3><p>Sets the miter limit of the generated outlines to
<i>limit</i>.</p>
<p>The miter limit describes how far from each join the miter join
can extend. The limit is specified in units of the currently set
width. So the pixelwise miter limit will be <tt>miterlimit *
width</tt>.</p>
<p>This value is only used if the join style is <a href="qt.html#PenJoinStyle-enum">Qt.MiterJoin</a>.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#miterLimit">miterLimit</a>().</p>


<h3 class="fn"><a name="setWidth" />QPainterPathStroker.setWidth (<i>self</i>, float&#160;<i>width</i>)</h3><p>Sets the width of the generated outline painter path to
<i>width</i>.</p>
<p>The generated outlines will extend approximately 50% of
<i>width</i> to each side of the given input path's original
outline.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#width">width</a>().</p>


<h3 class="fn"><a name="width" />float QPainterPathStroker.width (<i>self</i>)</h3><p>Returns the width of the generated outlines.</p>
<p><b>See also</b> <a href="qpainterpathstroker.html#setWidth">setWidth</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>