About my projects, examples and tutorials
Gnome::Gsk4::LinearGradientNode

Gnome::Gsk4::LinearGradientNode

Description§

A render node for a linear gradient.

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

new-lineargradientnode§

Creates a Gnome::Gsk4::RenderNode that will create a linear gradient from the given points and color stops, and render that into the area given by $bounds.

method new-lineargradientnode ( N-Object $bounds, N-Object $start, N-Object $end, N-Object $color-stops, Int() $n-color-stops --> Gnome::Gsk4::LinearGradientNode \)
Code
  • $bounds; the rectangle to render the linear gradient into
  • $start; the point at which the linear gradient will begin
  • $end; the point at which the linear gradient will finish
  • $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-color-stops§

Retrieves the color stops in the gradient.

method get-color-stops ( Array[gsize] $n-stops --> N-Object )
Code
  • $n-stops; (transfer ownership: full) the number of color stops in the returned array.

Return value; the color stops in the gradient.

get-end§

Retrieves the final point of the linear gradient.

method get-end (--> N-Object )
Code

Return value; the final point.

get-n-color-stops§

Retrieves the number of color stops in the gradient.

method get-n-color-stops (--> Int )
Code

Return value; the number of color stops.

get-start§

Retrieves the initial point of the linear gradient.

method get-start (--> N-Object )
Code

Return value; the initial point.