use Prima qw(Application); my $icon = Prima::Image-> create( width => 300, height => 300, ); $icon-> begin_paint; $icon-> color( cl::Black); $icon-> bar( 0, 0, 300, 300); $icon-> color( cl::White); $icon-> fillpoly([ 5, 5, 250, 5, 5, 200, 100, 100, 5,5 ]); $icon-> end_paint; Prima::Widget-> create( shape => $icon, size => [ 300, 300], # fixed size onMouseDown => sub { $::application-> close }, # click to exit ); run Prima;