QConicalGradient Class
The QConicalGradient class changes color around a center. More…
| Header | #include <QConicalGradient> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
| Inherits | QGradient |
List of all members, including inherited members
Public Functions
| QConicalGradient() | |
| QConicalGradient(const QPointF ¢er, qreal angle) | |
| QConicalGradient(qreal cx, qreal cy, qreal angle) | |
| QPointF | center() const |
| void | setCenter(const QPointF ¢er) |
| void | setCenter(qreal x, qreal y) |
| qreal | angle() const |
| void | setAngle(qreal angle) |
Detailed Description
The colors go counterclockwise around center(), starting at angle() degrees from 3 o'clock.
See also QGradient.
Differences from Qt
See QGradient.
Member Function Documentation
QConicalGradient::QConicalGradient()
Constructs a gradient at (0, 0) starting at 0 degrees.
QConicalGradient::QConicalGradient(const QPointF ¢er, qreal angle)
Constructs a gradient around center starting at angle degrees.
QConicalGradient::QConicalGradient(qreal cx, qreal cy, qreal angle)
Constructs a gradient around (cx, cy) starting at angle degrees.
qreal QConicalGradient::angle() const
Returns the angle where the gradient starts, in degrees counterclockwise from 3 o'clock.
QPointF QConicalGradient::center() const
Returns the center.
void QConicalGradient::setAngle(qreal angle)
Sets the angle where the gradient starts to angle degrees.
void QConicalGradient::setCenter(const QPointF ¢er)
Sets the center to center.
void QConicalGradient::setCenter(qreal x, qreal y)
This is an overloaded function.
Sets the center to (x, y).