Cairo::Gradient#

📦 std

Functions#

Other Functions#

add_color_stop_rgb#

Adds an opaque color stop to the gradient at $offset, a position from 0 to 1 along the gradient’s control vector: $gradient->add_color_stop_rgb($offset, $r, $g, $b). Returns nothing.

add_color_stop_rgba#

Adds a translucent color stop to the gradient at $offset: $gradient->add_color_stop_rgba($offset, $r, $g, $b, $a). Returns nothing.

get_color_stops#

Returns every color stop of the gradient, one five-element arrayref [$offset, $r, $g, $b, $a] per stop, in the order cairo holds them. On a pattern that is not a gradient it croaks with pattern-type-mismatch. Needs libcairo 1.4 or newer.