In this mode, gradient coordinates are relative to the bounding rect of the object
to be drawn. Thus, gradients can be specified between (0,0) and (1,1) in stylesheets
and will do The Right Thing™ regardless of the object's size.
This is also what Qt uses for its widgets.
return QBrush();
}
QLinearGradient gradient(x1, y1, x2, y2);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;
return QBrush();
}
QConicalGradient gradient(cx, cy, angle);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;
return QBrush();
}
QRadialGradient gradient(cx, cy, radius, fx, fy);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;