Cairo::SurfacePattern#
📦 std
Functions#
Other Functions#
create#
Creates a pattern that paints with the contents of $surface (cairo_pattern_create_for_surface): Cairo::SurfacePattern->create($surface). The surface argument is required. The result is blessed Cairo::SurfacePattern.
get_surface#
Returns the surface the pattern paints with, blessed into its own class (Cairo::ImageSurface, Cairo::PdfSurface, …). The surface stays valid for as long as you hold the returned object, even if the pattern goes away. On a pattern that is not a surface pattern it croaks with pattern-type-mismatch. Needs libcairo 1.4 or newer.