5 use Imager::Screenshot 'screenshot';
7 Imager::Screenshot->have_win32
8 or plan skip_all => "No Win32 support";
12 and plan skip_all => "Tk not available";
17 $mw = Tk::MainWindow->new;
19 $@ and plan skip_all => 'Cannot create a window in Tk';
21 $mw->windowingsystem eq 'win32'
22 or plan skip_all => 'Tk windowing system not Win32';
26 $mw->Label(-text => "test: $0")->pack;
29 $im = screenshot(widget => $mw)
30 or print "# ", Imager->errstr, "\n";
34 ok($im, "grab from a Tk widget");