Qt Jambi Home

com.trolltech.qt.gui
Class QConicalGradient

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.QConicalGradient
All Implemented Interfaces:
QtJambiInterface

public class QConicalGradient
extends QGradient

The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush.

Conical gradients interpolate interpolate colors counter-clockwise around a center point.

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 QConicalGradient class provides the angle and center functions returning the start angle and center of the gradient.

Note that the setSpread function has no effect for conical gradients. The reason is that the conical gradient is closed by definition, i.e. the conical 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.

See Also:
QLinearGradient, QRadialGradient, 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
QConicalGradient()
          Constructs a conical with center at (0, 0) starting the interpolation at angle 0.
QConicalGradient(double cx, double cy, double startAngle)
          Constructs a conical gradient with the given center (cx, cy), starting the interpolation at the given startAngle.
QConicalGradient(QPointF center, double startAngle)
          Constructs a conical gradient with the given center, starting the interpolation at the given startAngle.
 
Method Summary
 double angle()
          Returns the start angle of the conical gradient in logical coordinates.
 QPointF center()
          Returns the center of the conical gradient in logical coordinates.
static QConicalGradient fromNativePointer(QNativePointer nativePointer)
          This function returns the QConicalGradient instance pointed to by nativePointer
static QNativePointer nativePointerArray(QConicalGradient[] array)
          This function returns a QNativePointer that is pointing to the specified QConicalGradient array.
 void setAngle(double angle)
          Sets angle to be the start angle for this conical gradient in logical coordinates.
 void setCenter(double x, double y)
          Sets the center of this conical gradient in logical coordinates to (x, y).
 void setCenter(QPointF center)
          Sets the center of this conical gradient in logical coordinates to center.
 
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

QConicalGradient

public QConicalGradient()

Constructs a conical with center at (0, 0) starting the interpolation at angle 0.

See Also:
QGradient::setColorAt, setCenter, setAngle

QConicalGradient

public QConicalGradient(QPointF center,
                        double startAngle)

Constructs a conical gradient with the given center, starting the interpolation at the given startAngle. The startAngle must be specified in degrees between 0 and 360.

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

QConicalGradient

public QConicalGradient(double cx,
                        double cy,
                        double startAngle)

Constructs a conical gradient with the given center (cx, cy), starting the interpolation at the given startAngle. The angle must be specified in degrees between 0 and 360.

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

angle

public final double angle()

Returns the start angle of the conical gradient in logical coordinates.

See Also:
setAngle, stops

center

public final QPointF center()

Returns the center of the conical gradient in logical coordinates.

See Also:
setCenter, stops

setAngle

public final void setAngle(double angle)

Sets angle to be the start angle for this conical gradient in logical coordinates.

See Also:
angle

setCenter

public final void setCenter(QPointF center)

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

See Also:
center

setCenter

public final void setCenter(double x,
                            double y)

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

See Also:
center

fromNativePointer

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

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

nativePointerArray

public static QNativePointer nativePointerArray(QConicalGradient[] array)
This function returns a QNativePointer that is pointing to the specified QConicalGradient 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