copy_path#

Returns a copy of the current path as a Cairo::Path.

A Cairo::Path is a tied array of hashes, so it is read with ordinary Perl syntax rather than through methods:

my $path = $cr->copy_path;
for my $elem (@$path) {
    print "$elem->{type}\n";      # 'move-to', 'line-to', ...
}

The path is a snapshot: later drawing on the context does not change it, and it may be handed back to append_path on this or any other context. Wraps cairo_copy_path.