本页内容

C

Qul::PlatformInterface::LinearGradient Class

class Qul::PlatformInterface::LinearGradient

表示Brush 所使用的线性渐变。更多...

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

公共函数

LinearGradient()
LinearGradient(const Qul::PlatformInterface::PointF &start, const Qul::PlatformInterface::PointF &finalStop)
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

详细说明

线性渐变会在起始点和终点之间对颜色进行插值。

成员函数文档

LinearGradient::LinearGradient()

创建一个空的Qul::PlatformInterface::LinearGradient 对象。

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

创建一个Qul::PlatformInterface::LinearGradient 对象,其插值区域位于给定的start 点与finalStop 之间。

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

返回线性渐变的最后一个停靠点。

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

此便捷函数将给定position 处的渐变色块设置为给定的color 。

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

将线性渐变的渐变扩散设置为spread 。

另请参阅 spread()。

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

将线性渐变的颜色停点设置为stops 。

另请参阅 stops()。

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

返回梯度扩散量。

另请参阅 setSpread()。

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

返回线性渐变的起始点。

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

返回渐变的颜色停点。

另请参阅 setStops()。

在某些 Qt 许可下可用。
了解更多信息。