A class representing the linear gradient fill of the Shape object.
Besides the APIs inherited from the Fill class, it enables setting and getting the linear gradient bounds. The behavior outside the gradient bounds depends on the value specified in the spread API.
Result linear |
( |
float * |
x1, |
|
|
float * |
y1, |
|
|
float * |
x2, |
|
|
float * |
y2 |
|
) |
| const |
|
noexcept |
Gets the linear gradient bounds.
The bounds of the linear gradient are defined as a surface constrained by two parallel lines crossing the given points (x1
, y1
) and (x2
, y2
), respectively. Both lines are perpendicular to the line linking (x1
, y1
) and (x2
, y2
).
- Parameters
-
[out] | x1 | The horizontal coordinate of the first point used to determine the gradient bounds. |
[out] | y1 | The vertical coordinate of the first point used to determine the gradient bounds. |
[out] | x2 | The horizontal coordinate of the second point used to determine the gradient bounds. |
[out] | y2 | The vertical coordinate of the second point used to determine the gradient bounds. |
Result linear |
( |
float |
x1, |
|
|
float |
y1, |
|
|
float |
x2, |
|
|
float |
y2 |
|
) |
| |
|
noexcept |
Sets the linear gradient bounds.
The bounds of the linear gradient are defined as a surface constrained by two parallel lines crossing the given points (x1
, y1
) and (x2
, y2
), respectively. Both lines are perpendicular to the line linking (x1
, y1
) and (x2
, y2
).
- Parameters
-
[in] | x1 | The horizontal coordinate of the first point used to determine the gradient bounds. |
[in] | y1 | The vertical coordinate of the first point used to determine the gradient bounds. |
[in] | x2 | The horizontal coordinate of the second point used to determine the gradient bounds. |
[in] | y2 | The vertical coordinate of the second point used to determine the gradient bounds. |
- Note
- In case the first and the second points are equal, an object is filled with a single color using the last color specified in the colorStops().
- See also
- Fill::colorStops()