<class name="QGradient" doc="/**
&lt;p&gt;The &lt;a href=&quot;QGradient.html#QGradient()&quot;&gt;&lt;tt&gt;QGradient&lt;/tt&gt;&lt;/a&gt; class is used in combination with &lt;a href=&quot;QBrush.html&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt; to specify gradient fills.&lt;/p&gt;
&lt;p&gt;Qt currently supports three types of gradient fills:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;Linear&lt;/i&gt; gradients interpolate colors between start and end points.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Radial&lt;/i&gt; gradients interpolate colors between a focal point and end points on a circle surrounding it.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Conical&lt;/i&gt; gradients interpolate colors around a center point.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A gradient's type can be retrieved using the &lt;a href=&quot;QGradient.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt; function. Each of the types is represented by a subclass of &lt;a href=&quot;QGradient.html#QGradient()&quot;&gt;&lt;tt&gt;QGradient&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qgradient-linear.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qgradient-radial.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qgradient-conical.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;&lt;a href=&quot;QLinearGradient.html&quot;&gt;&lt;tt&gt;QLinearGradient&lt;/tt&gt;&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href=&quot;QRadialGradient.html&quot;&gt;&lt;tt&gt;QRadialGradient&lt;/tt&gt;&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href=&quot;QConicalGradient.html&quot;&gt;&lt;tt&gt;QConicalGradient&lt;/tt&gt;&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The colors in a gradient is defined using stop points of the QGradientStop type, i.e&amp;#x2e; a position and a color. Use the &lt;a href=&quot;QGradient.html#setColorAt(double, com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColorAt&lt;/tt&gt;&lt;/a&gt; function to define a single stop point. Alternatively, use the &lt;a href=&quot;QGradient.html#setStops(com.trolltech.qt.gui.QColor&gt;&gt;)&quot;&gt;&lt;tt&gt;setStops&lt;/tt&gt;&lt;/a&gt; function to define several stop points in one go. Note that the latter function &lt;i&gt;replaces&lt;/i&gt; the current set of stop points.&lt;/p&gt;
&lt;p&gt;It is the gradient's complete set of stop points (accessible through the &lt;a href=&quot;QGradient.html#stops()&quot;&gt;&lt;tt&gt;stops&lt;/tt&gt;&lt;/a&gt; function) 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.&lt;/p&gt;
&lt;p&gt;A diagonal linear gradient from black at (100, 100) to white at (200, 200) could be specified like this:&lt;/p&gt;
&lt;pre&gt;        QLinearGradient linearGrad(QPointF(100, 100), QPointF(200, 200));
        linearGrad.setColorAt(0, Qt::black);
        linearGrad.setColorAt(1, Qt::white);&lt;/pre&gt;
&lt;p&gt;A gradient can have an arbitrary number of stop points. The following would create a radial gradient starting with red in the center, blue and then green on the edges:&lt;/p&gt;
&lt;pre&gt;        QRadialGradient radialGrad(QPointF(100, 100), 100);
        radialGrad.setColorAt(0, Qt::red);
        radialGrad.setColorAt(0.5, Qt::blue);
        radialGrad.setColorAt(1, Qt::green);&lt;/pre&gt;
&lt;p&gt;It is possible to repeat or reflect the gradient outside its area by specifiying the spread method&lt;/tt&gt; using the &lt;a href=&quot;QGradient.html#setSpread(com.trolltech.qt.gui.QGradient.Spread)&quot;&gt;&lt;tt&gt;setSpread&lt;/tt&gt;&lt;/a&gt; function. The default is to pad the outside area with the color at the closest stop point. The currently set spread method&lt;/tt&gt; can be retrieved using the &lt;a href=&quot;QGradient.html#spread()&quot;&gt;&lt;tt&gt;spread&lt;/tt&gt;&lt;/a&gt; function. The QGradient::Spread enum defines three different methods:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qradialgradient-pad.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qradialgradient-repeat.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qradialgradient-reflect.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;PadSpread&lt;/td&gt;&lt;td&gt;RepeatSpread&lt;/td&gt;&lt;td&gt;ReflectSpread&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;Note that the &lt;a href=&quot;QGradient.html#setSpread(com.trolltech.qt.gui.QGradient.Spread)&quot;&gt;&lt;tt&gt;setSpread&lt;/tt&gt;&lt;/a&gt; function only has effect for linear and radial gradients. The reason is that the conical gradient is closed by definition, i.e&amp;#x2e; the &lt;i&gt;conical&lt;/i&gt; gradient fills the entire circle from 0 - 360 degrees, while the boundary of a radial or a linear gradient can be specified through its radius or final stop points, respectively.&lt;/p&gt;

@see The Gradients Demo&lt;/tt&gt;
@see &lt;a href=&quot;QBrush.html&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QGradient()" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QGradient.CoordinateMode coordinateMode()" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#setCoordinateMode(com.trolltech.qt.gui.QGradient.CoordinateMode)&quot;&gt;&lt;tt&gt;setCoordinateMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setColorAt(double pos, com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Creates a stop point at the given &lt;tt&gt;pos&lt;/tt&gt; with the given &lt;tt&gt;color&lt;/tt&gt;. The given &lt;tt&gt;pos&lt;/tt&gt; must be in the range 0 to 1.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#setStops(com.trolltech.qt.gui.QColor&gt;&gt;)&quot;&gt;&lt;tt&gt;setStops&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGradient.html#stops()&quot;&gt;&lt;tt&gt;stops&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setCoordinateMode(com.trolltech.qt.gui.QGradient.CoordinateMode mode)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#coordinateMode()&quot;&gt;&lt;tt&gt;coordinateMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setSpread(com.trolltech.qt.gui.QGradient.Spread spread)" doc="/**
&lt;p&gt;Specifies the spread &lt;tt&gt;spread&lt;/tt&gt; that should be used for this gradient.&lt;/p&gt;
&lt;p&gt;Note that this function only has effect for linear and radial gradients.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#spread()&quot;&gt;&lt;tt&gt;spread&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setStops(com.trolltech.qt.gui.QColor&gt;&gt; stops)" doc="/**
&lt;p&gt;Replaces the current set of stop points with the given &lt;tt&gt;stops&lt;/tt&gt;. The positions of the points must be in the range 0 to 1, and must be sorted with the lowest point first.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#setColorAt(double, com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColorAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGradient.html#stops()&quot;&gt;&lt;tt&gt;stops&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QGradient.Spread spread()" doc="/**
&lt;p&gt;Returns the spread method use by this gradient. The default is &lt;a href=&quot;QGradient.html#Spread-enum&quot;&gt;&lt;tt&gt;PadSpread&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#setSpread(com.trolltech.qt.gui.QGradient.Spread)&quot;&gt;&lt;tt&gt;setSpread&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.QPair&lt;java.lang.Double, com.trolltech.qt.gui.QColor&gt;&gt; stops()" doc="/**
&lt;p&gt;Returns the stop points for this gradient.&lt;/p&gt;
&lt;p&gt;If no stop points have been specified, a gradient of black at 0 to white at 1 is used.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#setStops(com.trolltech.qt.gui.QColor&gt;&gt;)&quot;&gt;&lt;tt&gt;setStops&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGradient.html#setColorAt(double, com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColorAt&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QGradient.Type type()" doc="/**
&lt;p&gt;Returns the type of gradient.&lt;/p&gt;
 */"/>
    <enum name="CoordinateMode" doc="/**
&lt;p&gt;This enum specifies how gradient coordinates map to the paint device on which the gradient is used.&lt;/p&gt;
 */">
        <enum-value name="LogicalMode" doc="/**
Internal. */"/>
        <enum-value name="StretchToDeviceMode" doc="/**
Internal. */"/>
        <enum-value name="ObjectBoundingMode" doc="/**
Internal. */"/>
</enum>
    <enum name="Spread" doc="/**
&lt;p&gt;Specifies how the area outside the gradient area should be filled.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#spread()&quot;&gt;&lt;tt&gt;spread&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGradient.html#setSpread(com.trolltech.qt.gui.QGradient.Spread)&quot;&gt;&lt;tt&gt;setSpread&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="PadSpread" doc="/**
&lt;p&gt;The area is filled with the closest stop color. This is the default.&lt;/p&gt;
 */"/>
        <enum-value name="ReflectSpread" doc="/**
&lt;p&gt;The gradient is reflected outside the gradient area.&lt;/p&gt;
 */"/>
        <enum-value name="RepeatSpread" doc="/**
&lt;p&gt;The gradient is repeated outside the gradient area.&lt;/p&gt;
 */"/>
</enum>
    <enum name="Type" doc="/**
&lt;p&gt;Specifies the type of gradient.&lt;/p&gt;

@see &lt;a href=&quot;QGradient.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="LinearGradient" doc="/**
&lt;p&gt;Interpolates colors between start and end points (&lt;a href=&quot;QLinearGradient.html&quot;&gt;&lt;tt&gt;QLinearGradient&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
 */"/>
        <enum-value name="RadialGradient" doc="/**
&lt;p&gt;Interpolate colors between a focal point and end points on a circle surrounding it (&lt;a href=&quot;QRadialGradient.html&quot;&gt;&lt;tt&gt;QRadialGradient&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
 */"/>
        <enum-value name="ConicalGradient" doc="/**
&lt;p&gt;Interpolate colors around a center point (&lt;a href=&quot;QConicalGradient.html&quot;&gt;&lt;tt&gt;QConicalGradient&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
 */"/>
        <enum-value name="NoGradient" doc="/**
&lt;p&gt;No gradient is used.&lt;/p&gt;
 */"/>
</enum>
</class>
