Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QLinearGradient Class Reference

The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush. More...

Inheritance diagram for QtGui.QLinearGradient:
Collaboration diagram for QtGui.QLinearGradient:

Public Member Functions

 QLinearGradient ()
 
 
 QLinearGradient (QLinearGradient copy)
 
 
 QLinearGradient (QPointF start, QPointF finalStop)
 
 
 QLinearGradient (double xStart, double yStart, double xFinalStop, double yFinalStop)
 
 
override void CreateProxy ()
 
new void SetFinalStop (double x, double y)
 
 
new void SetStart (double x, double y)
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QGradient
override bool Equals (object o)
 
override int GetHashCode ()
 
 QGradient ()
 
 QGradient (QGradient copy)
 
new void SetColorAt (double pos, QColor color)
 
 
new QGradient.Type type ()
 
 
new void Dispose ()
 

Protected Member Functions

 QLinearGradient (System.Type dummy)
 
- Protected Member Functions inherited from QtGui.QGradient
 QGradient (System.Type dummy)
 

Properties

new QPointF FinalStop [get, set]
 
 
new QPointF Start [get, set]
 
 
- Properties inherited from QtGui.QGradient
new QGradient.CoordinateMode coordinateMode [get, set]
 
 
new QGradient.InterpolationMode interpolationMode [get, set]
 
new QGradient.Spread spread [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
static new QMetaObject StaticMetaObject [get]
 

Additional Inherited Members

- Public Types inherited from QtGui.QGradient
enum  CoordinateMode { LogicalMode = 0, ObjectBoundingMode = 2, StretchToDeviceMode = 1 }
  More...
 
enum  InterpolationMode { ColorInterpolation = 0, ComponentInterpolation = 1 }
 
enum  Spread { PadSpread = 0, ReflectSpread = 1, RepeatSpread = 2 }
  More...
 
enum  Type { ConicalGradient = 2, LinearGradient = 0, NoGradient = 3, RadialGradient = 1 }
  More...
 
- Static Public Member Functions inherited from QtGui.QGradient
static bool operator!= (QGradient arg1, QGradient arg2)
 
 
static bool operator== (QGradient arg1, QGradient arg2)
 
 
- Protected Attributes inherited from QtGui.QGradient
SmokeInvocation interceptor
 

Detailed Description

The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush.

Linear gradients interpolate colors between start and end points. Outside these points the gradient is either padded, reflected or repeated depending on the currently set spread method:

PadSpread (default) ReflectSpread RepeatSpread

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 QLinearGradient class provides the finalStop() function which returns the final stop point of the gradient, and the start() function returning the start point of the gradient.

See also QRadialGradient, QConicalGradient, and The Gradients Demo.

Constructor & Destructor Documentation

QtGui.QLinearGradient.QLinearGradient ( System.Type  dummy)
protected
QtGui.QLinearGradient.QLinearGradient ( )

Constructs a default linear gradient with interpolation area between (0, 0) and (1, 1).

See also QGradient::setColorAt(), setStart(), and setFinalStop().

QtGui.QLinearGradient.QLinearGradient ( QLinearGradient  copy)

Constructs a default linear gradient with interpolation area between (0, 0) and (1, 1).

See also QGradient::setColorAt(), setStart(), and setFinalStop().

QtGui.QLinearGradient.QLinearGradient ( QPointF  start,
QPointF  finalStop 
)

Constructs a linear gradient with interpolation area between the given start point and finalStop.

Note: The expected parameter values are in pixels.

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

QtGui.QLinearGradient.QLinearGradient ( double  xStart,
double  yStart,
double  xFinalStop,
double  yFinalStop 
)

Constructs a default linear gradient with interpolation area between (0, 0) and (1, 1).

See also QGradient::setColorAt(), setStart(), and setFinalStop().

Member Function Documentation

override void QtGui.QLinearGradient.CreateProxy ( )
virtual

Reimplemented from QtGui.QGradient.

new void QtGui.QLinearGradient.Dispose ( )
new void QtGui.QLinearGradient.SetFinalStop ( double  x,
double  y 
)

Sets the final stop point of this linear gradient in logical coordinates to stop.

This function was introduced in Qt 4.2.

See also finalStop().

new void QtGui.QLinearGradient.SetStart ( double  x,
double  y 
)

Sets the start point of this linear gradient in logical coordinates to start.

This function was introduced in Qt 4.2.

See also start().

Property Documentation

new QPointF QtGui.QLinearGradient.FinalStop
getset

Returns the final stop point of this linear gradient in logical coordinates.

Sets the final stop point of this linear gradient in logical coordinates to stop.

This function was introduced in Qt 4.2.

new QPointF QtGui.QLinearGradient.Start
getset

Returns the start point of this linear gradient in logical coordinates.

Sets the start point of this linear gradient in logical coordinates to start.

This function was introduced in Qt 4.2.