Qt Jambi Home

com.trolltech.qt.gui
Class QRadialGradient

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QGradient
              extended by com.trolltech.qt.gui.QRadialGradient
All Implemented Interfaces:
QtJambiInterface

public class QRadialGradient
extends QGradient

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, Gradients Demo

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QGradient
QGradient.CoordinateMode, QGradient.Spread, QGradient.Type
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QRadialGradient()
          Constructs a radial gradient with the center and focal point at (0, 0) with a radius of 1.
QRadialGradient(double cx, double cy, double radius)
          Constructs a radial gradient with the center at (cx, cy) and the specified radius.
QRadialGradient(double cx, double cy, double radius, double fx, double fy)
          Constructs a radial gradient with the given center (cx, cy), radius and focal point (fx, fy).
QRadialGradient(QPointF center, double radius)
          Constructs a radial gradient with the given center, radius and the focal point in the circle center.
QRadialGradient(QPointF center, double radius, QPointF focalPoint)
          Constructs a radial gradient with the given center, radius and focalPoint.
 
Method Summary
 QPointF center()
          Returns the center of this radial gradient in logical coordinates.
 QPointF focalPoint()
          Returns the focal point of this radial gradient in logical coordinates.
static QRadialGradient fromNativePointer(QNativePointer nativePointer)
          This function returns the QRadialGradient instance pointed to by nativePointer
static QNativePointer nativePointerArray(QRadialGradient[] array)
          This function returns a QNativePointer that is pointing to the specified QRadialGradient array.
 double radius()
          Returns the radius of this radial gradient in logical coordinates.
 void setCenter(double x, double y)
          Sets the center of this radial gradient in logical coordinates to (x, y).
 void setCenter(QPointF center)
          Sets the center of this radial gradient in logical coordinates to center.
 void setFocalPoint(double x, double y)
          Sets the focal point of this radial gradient in logical coordinates to (x, y).
 void setFocalPoint(QPointF focalPoint)
          Sets the focal point of this radial gradient in logical coordinates to focalPoint.
 void setRadius(double radius)
          Sets the radius of this radial gradient in logical coordinates to radius
 
Methods inherited from class com.trolltech.qt.gui.QGradient
coordinateMode, equals, nativePointerArray, setColorAt, setCoordinateMode, setSpread, setStops, spread, stops, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QRadialGradient

public QRadialGradient()

Constructs a radial gradient with the center and focal point at (0, 0) with a radius of 1.


QRadialGradient

public QRadialGradient(QPointF center,
                       double radius,
                       QPointF focalPoint)

Constructs a radial gradient with the given center, radius and focalPoint.

See Also:
QGradient::setColorAt, QGradient::setStops

QRadialGradient

public QRadialGradient(QPointF center,
                       double radius)

Constructs a radial gradient with the given center, radius and the focal point in the circle center.

See Also:
QGradient::setColorAt, QGradient::setStops

QRadialGradient

public QRadialGradient(double cx,
                       double cy,
                       double radius,
                       double fx,
                       double fy)

Constructs a radial gradient with the given center (cx, cy), radius and focal point (fx, fy).

See Also:
QGradient::setColorAt, QGradient::setStops

QRadialGradient

public QRadialGradient(double cx,
                       double cy,
                       double radius)

Constructs a radial gradient with the center at (cx, cy) and the specified radius. The focal point lies at the center of the circle.

See Also:
QGradient::setColorAt, QGradient::setStops
Method Detail

center

public final QPointF center()

Returns the center of this radial gradient in logical coordinates.

See Also:
setCenter, QGradient::stops

focalPoint

public final QPointF focalPoint()

Returns the focal point of this radial gradient in logical coordinates.

See Also:
setFocalPoint, QGradient::stops

radius

public final double radius()

Returns the radius of this radial gradient in logical coordinates.

See Also:
setRadius, QGradient::stops

setCenter

public final void setCenter(double x,
                            double y)

Sets the center of this radial gradient in logical coordinates to (x, y).

See Also:
center

setCenter

public final void setCenter(QPointF center)

Sets the center of this radial gradient in logical coordinates to center.

See Also:
center

setFocalPoint

public final void setFocalPoint(QPointF focalPoint)

Sets the focal point of this radial gradient in logical coordinates to focalPoint.

See Also:
focalPoint

setFocalPoint

public final void setFocalPoint(double x,
                                double y)

Sets the focal point of this radial gradient in logical coordinates to (x, y).

See Also:
focalPoint

setRadius

public final void setRadius(double radius)

Sets the radius of this radial gradient in logical coordinates to radius

See Also:
radius

fromNativePointer

public static QRadialGradient fromNativePointer(QNativePointer nativePointer)
This function returns the QRadialGradient instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

public static QNativePointer nativePointerArray(QRadialGradient[] array)
This function returns a QNativePointer that is pointing to the specified QRadialGradient array.

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.

Qt Jambi Home