PageRenderTime 56ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/PyQt-x11-gpl-4.9.4/doc/html/qlineargradient.html

#
HTML | 95 lines | 78 code | 17 blank | 0 comment | 0 complexity | 06a890542e99a21f4c5f262de0a5eaf8 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
  3. <html><head><title>QLinearGradient Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
  4. a:link { color: #004faf; text-decoration: none }
  5. a:visited { color: #672967; text-decoration: none }
  6. td.postheader { font-family: sans-serif }
  7. tr.address { font-family: sans-serif }
  8. body { background: #ffffff; color: black; }
  9. </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">QLinearGradient Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QLinearGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a linear gradient brush.
  10. <a href="#details">More...</a></p>
  11. <p>Inherits <a href="qgradient.html">QGradient</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qlineargradient.html#QLinearGradient">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#QLinearGradient-2">__init__</a></b> (<i>self</i>, QPointF&#160;<i>start</i>, QPointF&#160;<i>finalStop</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#QLinearGradient-3">__init__</a></b> (<i>self</i>, float&#160;<i>xStart</i>, float&#160;<i>yStart</i>, float&#160;<i>xFinalStop</i>, float&#160;<i>yFinalStop</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#QLinearGradient-4">__init__</a></b> (<i>self</i>, QLinearGradient)</li><li><div class="fn" />QPointF <b><a href="qlineargradient.html#finalStop">finalStop</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#setFinalStop">setFinalStop</a></b> (<i>self</i>, QPointF&#160;<i>stop</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#setFinalStop-2">setFinalStop</a></b> (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#setStart">setStart</a></b> (<i>self</i>, QPointF&#160;<i>start</i>)</li><li><div class="fn" /><b><a href="qlineargradient.html#setStart-2">setStart</a></b> (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>)</li><li><div class="fn" />QPointF <b><a href="qlineargradient.html#start">start</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QLinearGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a linear gradient brush.</p>
  12. <p>Linear gradients interpolate colors between start and end
  13. points. Outside these points the gradient is either padded,
  14. reflected or repeated depending on the currently set <a href="qgradient.html#Spread-enum">spread</a> method:</p>
  15. <table class="generic">
  16. <tr class="odd" valign="top">
  17. <td><img alt="" src="images/qlineargradient-pad.png" /></td>
  18. <td><img alt="" src="images/qlineargradient-reflect.png" /></td>
  19. <td><img alt="" src="images/qlineargradient-repeat.png" /></td>
  20. </tr>
  21. <tr class="even" valign="top">
  22. <td><a href="qgradient.html#Spread-enum">PadSpread</a>
  23. (default)</td>
  24. <td><a href="qgradient.html#Spread-enum">ReflectSpread</a></td>
  25. <td><a href="qgradient.html#Spread-enum">RepeatSpread</a></td>
  26. </tr>
  27. </table>
  28. <p>The colors in a gradient is defined using stop points of the
  29. <a href="qgradient.html#QGradientStop-typedef">QGradientStop</a>
  30. type, i.e. a position and a color. Use the <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() or the
  31. <a href="qgradient.html#setStops">QGradient.setStops</a>()
  32. function to define the stop points. It is the gradient's complete
  33. set of stop points that describes how the gradient area should be
  34. filled. If no stop points have been specified, a gradient of black
  35. at 0 to white at 1 is used.</p>
  36. <p>In addition to the functions inherited from <a href="qgradient.html">QGradient</a>, the QLinearGradient class provides
  37. the <a href="qlineargradient.html#finalStop">finalStop</a>()
  38. function which returns the final stop point of the gradient, and
  39. the <a href="qlineargradient.html#start">start</a>() function
  40. returning the start point of the gradient.</p>
  41. <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QLinearGradient" />QLinearGradient.__init__ (<i>self</i>)</h3><p>Constructs a default linear gradient with interpolation area
  42. between (0, 0) and (1, 1).</p>
  43. <p><b>See also</b> <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>(), <a href="qlineargradient.html#setStart">setStart</a>(), and <a href="qlineargradient.html#setFinalStop">setFinalStop</a>().</p>
  44. <h3 class="fn"><a name="QLinearGradient-2" />QLinearGradient.__init__ (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>start</i>, <a href="qpointf.html">QPointF</a>&#160;<i>finalStop</i>)</h3><p>Constructs a linear gradient with interpolation area between the
  45. given <i>start</i> point and <i>finalStop</i>.</p>
  46. <p><b>Note:</b> The expected parameter values are in pixels.</p>
  47. <p><b>See also</b> <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() and
  48. <a href="qgradient.html#setStops">QGradient.setStops</a>().</p>
  49. <h3 class="fn"><a name="QLinearGradient-3" />QLinearGradient.__init__ (<i>self</i>, float&#160;<i>xStart</i>, float&#160;<i>yStart</i>, float&#160;<i>xFinalStop</i>, float&#160;<i>yFinalStop</i>)</h3><p>Constructs a linear gradient with interpolation area between
  50. (<i>x1</i>, <i>y1</i>) and (<i>x2</i>, <i>y2</i>).</p>
  51. <p><b>Note:</b> The expected parameter values are in pixels.</p>
  52. <p><b>See also</b> <a href="qgradient.html#setColorAt">QGradient.setColorAt</a>() and
  53. <a href="qgradient.html#setStops">QGradient.setStops</a>().</p>
  54. <h3 class="fn"><a name="QLinearGradient-4" />QLinearGradient.__init__ (<i>self</i>, <a href="qlineargradient.html">QLinearGradient</a>)</h3><h3 class="fn"><a name="finalStop" /><a href="qpointf.html">QPointF</a> QLinearGradient.finalStop (<i>self</i>)</h3><p>Returns the final stop point of this linear gradient in logical
  55. coordinates.</p>
  56. <p><b>See also</b> <a href="qlineargradient.html#setFinalStop">setFinalStop</a>() and <a href="qgradient.html#stops">QGradient.stops</a>().</p>
  57. <h3 class="fn"><a name="setFinalStop" />QLinearGradient.setFinalStop (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>stop</i>)</h3><p>Sets the final stop point of this linear gradient in logical
  58. coordinates to <i>stop</i>.</p>
  59. <p>This function was introduced in Qt 4.2.</p>
  60. <p><b>See also</b> <a href="qlineargradient.html#finalStop">finalStop</a>().</p>
  61. <h3 class="fn"><a name="setFinalStop-2" />QLinearGradient.setFinalStop (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>)</h3><p>This is an overloaded function.</p>
  62. <p>Sets the final stop point of this linear gradient in logical
  63. coordinates to <i>x</i>, <i>y</i>.</p>
  64. <p>This function was introduced in Qt 4.2.</p>
  65. <p><b>See also</b> <a href="qlineargradient.html#start">start</a>().</p>
  66. <h3 class="fn"><a name="setStart" />QLinearGradient.setStart (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>start</i>)</h3><p>Sets the start point of this linear gradient in logical
  67. coordinates to <i>start</i>.</p>
  68. <p>This function was introduced in Qt 4.2.</p>
  69. <p><b>See also</b> <a href="qlineargradient.html#start">start</a>().</p>
  70. <h3 class="fn"><a name="setStart-2" />QLinearGradient.setStart (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>)</h3><p>This is an overloaded function.</p>
  71. <p>Sets the start point of this linear gradient in logical
  72. coordinates to <i>x</i>, <i>y</i>.</p>
  73. <p>This function was introduced in Qt 4.2.</p>
  74. <p><b>See also</b> <a href="qlineargradient.html#start">start</a>().</p>
  75. <h3 class="fn"><a name="start" /><a href="qpointf.html">QPointF</a> QLinearGradient.start (<i>self</i>)</h3><p>Returns the start point of this linear gradient in logical
  76. coordinates.</p>
  77. <p><b>See also</b> <a href="qlineargradient.html#setStart">setStart</a>() and <a href="qgradient.html#stops">QGradient.stops</a>().</p>
  78. <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.4 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.2</td></tr></table></div></address></body></html>