Cairo::LinearGradient#

📦 std

Functions#

Other Functions#

create#

Creates a linear gradient running from ($x0, $y0) to ($x1, $y1): Cairo::LinearGradient->create($x0, $y0, $x1, $y1). The gradient has no color until you add stops with add_color_stop_rgb/_rgba.

get_points#

Returns the linear gradient’s two endpoints as the four-element list ($x0, $y0, $x1, $y1). On a pattern that is not a linear gradient it croaks with pattern-type-mismatch. Needs libcairo 1.4 or newer.