1Prima::Drawable::SubcanUvsaesr(3C)ontributed Perl DocumePnrtiamtai:o:nDrawable::Subcanvas(3)
2
3
4
6 Prima::Drawable::Subcanvas - paint a hierarchy of widgets to any
7 drawable
8
10 Needed for painting a screenshot on an image, printer, etc. When
11 loaded, it aytomatically adds two methods to any Drawable:
12 paint_with_widgets and screenshot.
13
15 use Prima qw(Application Button);
16 my $w = Prima::MainWindow-> create;
17 $w->insert( 'Button' );
18 $w->screenshot->save('a.bmp');
19
21 paint_with_widgets $canvas, $x=0, $y=0
22 Given a $canvas is in paint mode, traverses all widgets as they are
23 seen on screen, and paints them on the canvas with given "$x,$y"
24 offsets.
25
26 screenshot $canvas, %opt
27 Syntax sugar over the paint_with_widgets. Creates an image with the
28 $self's, size, and calls "paint_with_widgets" with it. Returns the
29 screen shot.
30
32 David Mertens
33
35 examples/grip.pl
36
37
38
39perl v5.34.1 2022-04-20 Prima::Drawable::Subcanvas(3)