Home · Overviews · Examples 

QRadialGradient Class Reference
[com.trolltech.qt.gui module]

The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush. More...

Inherits QGradient.


Detailed Description

The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush.

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 spread method:

PadSpread (default)ReflectSpreadRepeatSpread

The colors in a gradient is defined using stop points of the QGradientStop type, i.e. a position and a color. Use the QGradient::setColorAt() or the QGradient::setStops() 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.

In addition to the functions inherited from QGradient, the QRadialGradient class provides the center, focalPoint and radius functions returning the gradient's center, focal point and radius respectively.

See also QLinearGradient, QConicalGradient, and The Gradients Demo.


Copyright © 2007 Trolltech Trademarks
Qt Jambi 4.3.2_01