Cairo::SolidPattern#

📦 std

Functions#

Other Functions#

create_rgb#

Creates an opaque solid-color pattern from the three components (cairo_pattern_create_rgb): Cairo::SolidPattern->create_rgb($r, $g, $b). Each is in the range 0 to 1. All three are required; a shorter argument list croaks with a usage message. The result is blessed Cairo::SolidPattern.

create_rgba#

Creates a translucent solid-color pattern (cairo_pattern_create_rgba): Cairo::SolidPattern->create_rgba($r, $g, $b, $a). All four components are in the range 0 to 1 and all four are required.

get_rgba#

Returns the solid pattern’s color as the four-element list ($r, $g, $b, $a). On a pattern that is not solid it croaks with pattern-type-mismatch. Needs libcairo 1.4 or newer.