![]() |
ThorVG v1.0
|
A class representing the radial gradient fill of the Shape object. More...
#include <thorvg.h>


Public Member Functions | |
| Result | radial (float cx, float cy, float r, float fx, float fy, float fr) noexcept |
| Sets the radial gradient attributes. | |
| Result | radial (float *cx, float *cy, float *r, float *fx=nullptr, float *fy=nullptr, float *fr=nullptr) const noexcept |
| Gets the radial gradient attributes. | |
| Type | type () const noexcept override |
| Returns the ID value of this class. | |
Public Member Functions inherited from Fill | |
| Result | colorStops (const ColorStop *colorStops, uint32_t cnt) noexcept |
| Sets the parameters of the colors of the gradient and their position. | |
| Result | spread (FillSpread s) noexcept |
| Sets the FillSpread value, which specifies how to fill the area outside the gradient bounds. | |
| Result | transform (const Matrix &m) noexcept |
| Sets the matrix of the affine transformation for the gradient fill. | |
| uint32_t | colorStops (const ColorStop **colorStops) const noexcept |
| Gets the parameters of the colors of the gradient, their position and number. | |
| FillSpread | spread () const noexcept |
| Gets the FillSpread value of the fill. | |
| Matrix & | transform () const noexcept |
| Gets the matrix of the affine transformation of the gradient fill. | |
| Fill * | duplicate () const noexcept |
| Creates a copy of the Fill object. | |
Static Public Member Functions | |
| static RadialGradient * | gen () noexcept |
| Creates a new RadialGradient object. | |
A class representing the radial gradient fill of the Shape object.
|
staticnoexcept |
Creates a new RadialGradient object.
|
noexcept |
Gets the radial gradient attributes.
| [out] | cx | The horizontal coordinate of the center of the end circle. |
| [out] | cy | The vertical coordinate of the center of the end circle. |
| [out] | r | The radius of the end circle. |
| [out] | fx | The horizontal coordinate of the center of the start circle. |
| [out] | fy | The vertical coordinate of the center of the start circle. |
| [out] | fr | The radius of the start circle. |
|
noexcept |
Sets the radial gradient attributes.
The radial gradient is defined by the end circle with a center (cx, cy) and a radius r and the start circle with a center/focal point (fx, fy) and a radius fr. The gradient will be rendered such that the gradient stop at an offset of 100% aligns with the edge of the end circle and the stop at an offset of 0% aligns with the edge of the start circle.
| [in] | cx | The horizontal coordinate of the center of the end circle. |
| [in] | cy | The vertical coordinate of the center of the end circle. |
| [in] | r | The radius of the end circle. |
| [in] | fx | The horizontal coordinate of the center of the start circle. |
| [in] | fy | The vertical coordinate of the center of the start circle. |
| [in] | fr | The radius of the start circle. |
| Result::InvalidArguments | in case the radius r or fr value is negative. |
r is zero, an object is filled with a single color using the last color specified in the colorStops(). fx and fy) lies outside the end circle, it is projected onto the edge of the end circle. fr is reduced accordingly. fx and fy) with the center of the end circle (cx and cy) and set the radius (fr) to zero. This will result in a uniform gradient without any focal variations.
|
overridevirtualnoexcept |
Returns the ID value of this class.
This method can be used to check the current concrete instance type.
Implements Fill.