Prima::...bcanvas(3)

πŸ“¦
version 1.74000 Β· 5 versions
, in opensuse-leap 16.0

✨ NAME ✨

okay so this is the Prima::...bcanvas(3) page, and the main character is Prima::Drawable::Subcanvas β€” it’s literally for painting a hierarchy of widgets to any drawable. no cap. πŸ’…


πŸ’– DESCRIPTION πŸ’–

The whole point? It’s needed for painting a screenshot on an image, printer, etc. iconic behavior, honestly.

It adds two methods to the Prima::Drawable namespace: paint_with_widgets and screenshot. that’s the whole vibe. periodt. 🫢


🌸 SYNOPSIS 🌸

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

πŸŽ€ METHODS πŸŽ€

🎨 paint_with_widgets $canvas, $x=0, $y=0

Given that $canvas is in the paint mode, this method traverses all widgets exactly as they are seen on the screen, and paints them on the canvas with the given $x,$y offsets. it’s giving β€œtake the whole widget situation and put it over there.” ✨

πŸ“Έ screenshot $canvas, %opt

Syntax sugar over paint_with_widgets. literally the shortcut bestie. πŸ“

It creates an image with the $self's, size, calls paint_with_widgets with it, and returns the screenshot. obsessed. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

David Mertens


πŸ¦‹ SEE ALSO πŸ¦‹

examples/grip.pl


mwah πŸ’‹ β€” this page is from perl v5.42.0, dated 2024-08-20. slay and goodbye. 🌈

πŸ“¦ where this page comes from