#!c:\perl\bin\perl.exe use strict; use warnings; use diagnostics; use Tk; my $mw = MainWindow->new(-title => "Line over an image"); my $c = $mw->Scrolled("Canvas", -cursor => 'crosshair', -scrollbars => 'se', ) ->pack(-anchor => 'nw', -fill => 'both', -expand => 1, ); my $tile = $c->createImage(50, 50, -image => $mw->Photo(-file => Tk->findINC('Xcamel.gif')), ); my $line = $c->createLine(0, 0, 100, 100, -width => 2, -fill => "red", ); MainLoop();