1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<?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>QRadialGradient 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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QRadialGradient Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QRadialGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a radial gradient brush. <a href="#details">More...</a></p>
<p>Inherits <a href="qgradient.html">QGradient</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qradialgradient.html#QRadialGradient">__init__</a></b> (<i>self</i>, QPointF <i>center</i>, float <i>radius</i>, QPointF <i>focalPoint</i> = QPointF())</li><li><div class="fn" /><b><a href="qradialgradient.html#QRadialGradient-2">__init__</a></b> (<i>self</i>, float <i>cx</i>, float <i>cy</i>, float <i>radius</i>, float <i>fx</i> = 0, float <i>fy</i> = 0)</li><li><div class="fn" /><b><a href="qradialgradient.html#QRadialGradient-3">__init__</a></b> (<i>self</i>, QRadialGradient)</li><li><div class="fn" />QPointF <b><a href="qradialgradient.html#center">center</a></b> (<i>self</i>)</li><li><div class="fn" />QPointF <b><a href="qradialgradient.html#focalPoint">focalPoint</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qradialgradient.html#radius">radius</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QRadialGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a radial gradient brush.</p>
<p>Radial gradients interpolate colors between a focal point and end points on a circle surrounding it. Outside the end points the gradient is either padded, reflected or repeated depending on the currently set <a href="qgradient.html#Spread-enum">spread</a> method:</p>
<table align="center" border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#F0F0F0" valign="top">
<td><img src="images/qradialgradient-pad.png" /></td>
<td><img src="images/qradialgradient-reflect.png" /></td>
<td><img src="images/qradialgradient-repeat.png" /></td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><a href="qgradient.html#Spread-enum">PadSpread</a> (default)</td>
<td><a href="qgradient.html#Spread-enum">ReflectSpread</a></td>
<td><a href="qgradient.html#Spread-enum">RepeatSpread</a></td>
</tr>
</table>
<br />
<br />
<p>The colors in a gradient is defined using stop points of the <a href="qgradient.html#QGradientStop-typedef">QGradientStop</a> type, i.e. a position and a color. Use the <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() or the <a href="qgradient.html#setStops">QGradient.setStops</a>() function to define the stop points. It is the gradient's complete set of stop points that describes how the gradient area should be filled. If no stop points have been specified, a gradient of black at 0 to white at 1 is used.</p>
<p>In addition to the functions inherited from <a href="qgradient.html">QGradient</a>, the QRadialGradient class provides the <a href="qradialgradient.html#center">center</a>(), <a href="qradialgradient.html#focalPoint">focalPoint</a>() and <a href="qradialgradient.html#radius">radius</a>() functions returning the gradient's center, focal point and radius respectively.</p>
<p>See also <a href="qlineargradient.html">QLinearGradient</a>, <a href="qconicalgradient.html">QConicalGradient</a>, and <a href="demos-gradients.html">The Gradients Demo</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QRadialGradient" />QRadialGradient.__init__ (<i>self</i>, <a href="qpointf.html">QPointF</a> <i>center</i>, float <i>radius</i>, <a href="qpointf.html">QPointF</a> <i>focalPoint</i> = QPointF())</h3><p>Constructs a radial gradient with the given <i>center</i>, <i>radius</i> and <i>focalPoint</i>.</p>
<p>The default focalPoint is the circle center. If the <i>focalPoint</i> is outside the circle defined by the given <i>center</i> and <i>radius</i>, it is clamped to the circle's boundary.</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() and <a href="qgradient.html#setStops">QGradient.setStops</a>().</p>
<h3 class="fn"><a name="QRadialGradient-2" />QRadialGradient.__init__ (<i>self</i>, float <i>cx</i>, float <i>cy</i>, float <i>radius</i>, float <i>fx</i> = 0, float <i>fy</i> = 0)</h3><p>Constructs a radial gradient with the given center (<i>cx</i>, <i>cy</i>), <i>radius</i> and focal point (<i>fx</i>, <i>fy</i>).</p>
<p>The default focal point is the circle center. If the focal point is outside the circle defined by the given center and <i>radius</i>, it is clamped to the circle's boundary.</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() and <a href="qgradient.html#setStops">QGradient.setStops</a>().</p>
<h3 class="fn"><a name="QRadialGradient-3" />QRadialGradient.__init__ (<i>self</i>, <a href="qradialgradient.html">QRadialGradient</a>)</h3><h3 class="fn"><a name="center" /><a href="qpointf.html">QPointF</a> QRadialGradient.center (<i>self</i>)</h3><p>Returns the center of this radial gradient in logical coordinates.</p>
<p>See also <a href="qgradient.html#stops">QGradient.stops</a>().</p>
<h3 class="fn"><a name="focalPoint" /><a href="qpointf.html">QPointF</a> QRadialGradient.focalPoint (<i>self</i>)</h3><p>Returns the focal point of this radial gradient in logical coordinates.</p>
<p>See also <a href="qgradient.html#stops">QGradient.stops</a>().</p>
<h3 class="fn"><a name="radius" />float QRadialGradient.radius (<i>self</i>)</h3><p>Returns the radius of the radial gradient in logical coordinates.</p>
<p>See also <a href="qgradient.html#stops">QGradient.stops</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|