C

LinearGradient Class

class Qul::PlatformInterface::LinearGradient

Represents a linear gradient used by Brush. More...

Header: #include <platforminterface/drawingengine.h>
Since: Qt Quick Ultralite (Platform) 2.7

Public Functions

LinearGradient(const Qul::PlatformInterface::PointF &start, const Qul::PlatformInterface::PointF &finalStop)
LinearGradient()
Qul::PlatformInterface::PointF finalStop() const
void setColorAt(float position, Qul::PlatformInterface::Rgba32 color)
void setSpread(Qul::PlatformInterface::GradientSpread spread)
void setStops(const Qul::PlatformInterface::GradientStops &stops)
Qul::PlatformInterface::GradientSpread spread() const
Qul::PlatformInterface::PointF start() const
const Qul::PlatformInterface::GradientStops &stops() const

Detailed Description

Linear gradients interpolate colors between the start and final stop points.

Member Function Documentation

LinearGradient::LinearGradient(const Qul::PlatformInterface::PointF &start, const Qul::PlatformInterface::PointF &finalStop)

Constructs a Qul::PlatformInterface::LinearGradient object with interpolation area between the given start point and finalStop.

LinearGradient::LinearGradient()

Constructs an empty Qul::PlatformInterface::LinearGradient object.

Qul::PlatformInterface::PointF LinearGradient::finalStop() const

Returns the final stop of the linear gradient.

void LinearGradient::setColorAt(float position, Qul::PlatformInterface::Rgba32 color)

This convenience function sets the gradient stop at the given position to the given color.

void LinearGradient::setSpread(Qul::PlatformInterface::GradientSpread spread)

Sets the gradient spread of the linear gradient to spread.

See also spread().

void LinearGradient::setStops(const Qul::PlatformInterface::GradientStops &stops)

Sets the color stops of the linear gradient to stops.

See also stops().

Qul::PlatformInterface::GradientSpread LinearGradient::spread() const

Returns the gradient spread.

See also setSpread().

Qul::PlatformInterface::PointF LinearGradient::start() const

Returns the start point of the linear gradient.

const Qul::PlatformInterface::GradientStops &LinearGradient::stops() const

Returns the color stops of the gradient.

See also setStops().

Available under certain Qt licenses.
Find out more.