Scroll to navigation

Prima::Drawable::Metafile(3) User Contributed Perl Documentation Prima::Drawable::Metafile(3)

NAME

Prima::Drawable::Metafile - graphics recorder

DESCRIPTION

Metafiles can record graphic primitives and replay them later on another canvas

SYNOPSIS

  my $metafile = Prima::Drawable::Metafile->new( size => [30, 30] );
  $metafile->begin_paint;
  $metafile->rectangle(10,10,20,20);
  $metafile->end_paint;
  $metafile->execute( $another_drawable, 100, 100 );

API

$SUB will be called when the metafile is executed, with the first two parameters the metafile and the target canvas, and @ARGS thereafter.
When called without parameters, clears the content before proceeding. Otherwise same as "Drawable.clear".
Draws the content on the CANVAS with X,Y offset
Sets the metafile extensions; the content is not clipped by it.

AUTHOR

Dmitry Karasik, <dmitry@karasik.eu.org>.

SEE ALSO

Prima, Prima::Buttons, examples/buttons.pl

2024-08-20 perl v5.40.0