com.trolltech.qt.gui
Class QConicalGradient

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      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, java.lang.Cloneable

public class QConicalGradient
extends QGradient
implements java.lang.Cloneable

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, and The 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.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
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 angle.
QConicalGradient(QPointF center, double startAngle)
          Constructs a conical gradient with the given center, starting the interpolation at the given angle.
 
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.
 QConicalGradient clone()
          This method is reimplemented for internal reasons
 void setAngle(double angle)
          Sets angle to be the start angle for this conical gradient in logical coordinates.
 void setCenter(double x, double y)
          This is an overloaded member function, provided for convenience.
 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, setColorAt, setCoordinateMode, setSpread, setStops, spread, stops, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
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(), and setAngle().


QConicalGradient

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

See also:
QGradient::setColorAt(), and 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 angle. The angle must be specified in degrees between 0 and 360.

See also:
QGradient::setColorAt(), and QGradient::setStops().

Method Detail

angle

public final double angle()
Returns the start angle of the conical gradient in logical coordinates.

See also:
setAngle(), and stops().


center

public final QPointF center()
Returns the center of the conical gradient in logical coordinates.

See also:
setCenter(), and 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)
This is an overloaded member function, provided for convenience.

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

See also:
center().


clone

public QConicalGradient clone()
This method is reimplemented for internal reasons

Overrides:
clone in class QGradient