ThorVG
v0.15
|
An abstract class representing the gradient fill of the Shape object. More...
Classes | |
struct | ColorStop |
A data structure storing the information about the color and its relative position inside the gradient bounds. More... | |
Public Member Functions | |
Result | colorStops (const ColorStop *colorStops, uint32_t cnt) noexcept |
Sets the parameters of the colors of the gradient and their position. More... | |
Result | spread (FillSpread s) noexcept |
Sets the FillSpread value, which specifies how to fill the area outside the gradient bounds. More... | |
Result | transform (const Matrix &m) noexcept |
Sets the matrix of the affine transformation for the gradient fill. More... | |
uint32_t | colorStops (const ColorStop **colorStops) const noexcept |
Gets the parameters of the colors of the gradient, their position and number. More... | |
FillSpread | spread () const noexcept |
Gets the FillSpread value of the fill. More... | |
Matrix | transform () const noexcept |
Gets the matrix of the affine transformation of the gradient fill. More... | |
Fill * | duplicate () const noexcept |
Creates a copy of the Fill object. More... | |
virtual Type | type () const noexcept=0 |
Returns the ID value of this class. More... | |
TVG_DEPRECATED uint32_t | identifier () const noexcept |
An abstract class representing the gradient fill of the Shape object.
It contains the information about the gradient colors and their arrangement inside the gradient bounds. The gradients bounds are defined in the LinearGradient or RadialGradient class, depending on the type of the gradient to be used. It specifies the gradient behavior in case the area defined by the gradient bounds is smaller than the area to be filled.
|
noexcept |
Gets the parameters of the colors of the gradient, their position and number.
[out] | colorStops | A pointer to the memory location, where the array of the gradient's ColorStop is stored. |
colorStops
array. Sets the parameters of the colors of the gradient and their position.
[in] | colorStops | An array of ColorStop data structure. |
[in] | cnt | The count of the colorStops array equal to the colors number used in the gradient. |
|
noexcept |
|
noexcept |
|
noexcept |
Gets the FillSpread value of the fill.
|
noexcept |
Sets the FillSpread value, which specifies how to fill the area outside the gradient bounds.
[in] | s | The FillSpread value. |
|
noexcept |
Gets the matrix of the affine transformation of the gradient fill.
In case no transformation was applied, the identity matrix is returned.
Sets the matrix of the affine transformation for the gradient fill.
The augmented matrix of the transformation is expected to be given.
[in] | m | The 3x3 augmented matrix. |
|
pure virtualnoexcept |
Returns the ID value of this class.
This method can be used to check the current concrete instance type.
Implemented in RadialGradient, and LinearGradient.