绘制带渐变色彩的图形

本文介绍了如何使用QRadialGradient构造径向渐变,并通过setColorAt方法设置颜色停靠点,创建从中心向外逐渐变化的颜色效果。代码示例展示了渐变的应用。
摘要由CSDN通过智能技术生成

代码片段:

QRadialGradient::QRadialGradient(const QPointF &center, qreal radius, const QPointF &focalPoint)

Constructs a simple radial gradient with the given center, radius and focalPoint.

Note: If the given focal point is outside the circle defined by the center point and radius, it will be re-adjusted to lie at a point on the circle where it intersects with the line from center to focalPoint.

构造一个具有给定中心,半径和焦点的简单径向渐变。
注意:如果给定的焦点在由中心点和半径定义的圆之外,则将其重新调整为位于圆上与中心到焦点的线相交的点上。

void QGradient::setColorAt(

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值