Scroll to navigation

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

NAME

Prima::Drawable::Subcanvas - paint a hierarchy of widgets to any drawable

DESCRIPTION

Needed for painting a screenshot on an image, printer, etc. Adds two methods to the "Prima::Drawable" namespace: paint_with_widgets and screenshot.

SYNOPSIS

    use Prima qw(Application Button);
    my $w = Prima::MainWindow-> create;
    $w->insert( 'Button' );
    $w->screenshot->save('a.bmp');

METHODS

Given a $canvas is in the paint mode, traverses all widgets as they are seen on the screen, and paints them on the canvas with given "$x,$y" offsets.
Syntax sugar over the paint_with_widgets. Creates an image with the $self's, size, and calls "paint_with_widgets" with it. Returns the screenshot.

AUTHOR

David Mertens

SEE ALSO

examples/grip.pl

2024-02-01 perl v5.38.2