~ubuntu-branches/ubuntu/maverick/perl-tk/maverick

« back to all changes in this revision

Viewing changes to canvastile

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2010-05-30 09:19:40 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100530091940-wbmq9bloo92t9m6x
Tags: 1:804.029-1
* New Upstream Release (Closes: #578814).
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
use Tk;
2
 
use Tk::widgets qw(Canvas);
3
 
my $mw = MainWindow->new();
4
 
my $tile = $mw->Photo(-file =>Tk->findINC('Camel.xpm'));
5
 
my $c  = $mw->Canvas(
6
 
        -background  => 'yellow',
7
 
        -width       => 300,
8
 
        -height      => 250,
9
 
        -relief      => 'raised',
10
 
        -borderwidth => 3,
11
 
#       -tile        => $tile,
12
 
        -offset      => [-30,-30],
13
 
        )->pack;
14
 
 
15
 
$c->createImage(30,30, -image => $tile);
16
 
 
17
 
    $c->update;
18
 
    $c->after(1000);
19
 
    $c->configure(-tile => $tile);
20
 
MainLoop;