Gnome::Gsk4::ConicGradientNode
Description
A render node for a conic gradient.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-conicgradientnode
Creates a Gnome::Gsk4::RenderNode that draws a conic gradient.
The conic gradient starts around $center
in the direction of $rotation
. A rotation of 0 means that the gradient points up. Color stops are then added clockwise.
method new-conicgradientnode ( N-Object $bounds, N-Object $center, Num() $rotation, N-Object $color-stops, Int() $n-color-stops --> Gnome::Gsk4::ConicGradientNode \)
$bounds; the bounds of the node
$center; the center of the gradient
$rotation; the rotation of the gradient in degrees.
$color-stops; a pointer to an array of Gnome::Gsk4::N-ColorStop defining the gradient. The offsets of all color stops must be increasing. The first stop's offset must be >= 0 and the last stop's offset must be <= 1.
$n-color-stops; the number of elements in
$color-stops
.
Methods
get-angle
Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].
The angle is starting at the top and going clockwise, as expressed in the css specification:
angle = 90 - C<.get-rotation()>
method get-angle (--> Num )
Return value; the angle for the gradient.
get-center
Retrieves the center pointer for the gradient.
method get-center (--> N-Object )
Return value; the center point for the gradient.
get-color-stops
Retrieves the color stops in the gradient.
method get-color-stops ( Array[gsize] $n-stops --> N-Object )
$n-stops; (transfer ownership: full) the number of color stops in the returned array.
Return value; the color stops in the gradient.
get-n-color-stops
Retrieves the number of color stops in the gradient.
method get-n-color-stops (--> Int )
Return value; the number of color stops.
get-rotation
Retrieves the rotation for the gradient in degrees.
method get-rotation (--> Num )
Return value; the rotation for the gradient.