diff options
Diffstat (limited to 'Perl/demos/Tk/demos/zinc_lib/window-contours.pl')
-rw-r--r-- | Perl/demos/Tk/demos/zinc_lib/window-contours.pl | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/window-contours.pl b/Perl/demos/Tk/demos/zinc_lib/window-contours.pl index 0cf4018..9199f20 100644 --- a/Perl/demos/Tk/demos/zinc_lib/window-contours.pl +++ b/Perl/demos/Tk/demos/zinc_lib/window-contours.pl @@ -11,32 +11,28 @@ package window_contours; # for avoiding symbol collision between different demos my $mw = MainWindow->new(); -# The explanation displayed when running this demo -my $text = $mw->Scrolled(qw/Text -relief sunken -borderwidth 2 -setgrid true - -height 10 -scrollbars e/); -$text->pack(qw/-expand yes -fill both/); - -$text->insert('0.0', -'These "windows" are simply rectangles holed by 4 smaller rectangles. -You can see text appearing behind the "windows"! -The following operations are possible: - "Mouse Button 1" for dragging text or "windows".'); # Creating the zinc widget my $zinc = $mw->Zinc(-width => 600, -height => 500, - -font => "10x20", # usually fonts are sets in resources + -font => "9x15", # usually fonts are sets in resources # but for this example it is set in the code! -borderwidth => 3, -relief => 'sunken', -# -backcolor => "white", )->pack; +# The explanation displayed when running this demo +$zinc->add('text', 1, + -position=> [10,10], + -text => 'These "windows" are simply rectangles holed by 4 smaller +rectangles. The text appears behind the window glasses. +You can drag text or "windows".', + -font => "10x20", + ); # Text in background my $backtext = $zinc->add('text', 1, -position=> [50,200], -text => "This text appears\nthrough holes of curves", -font => "-adobe-helvetica-bold-o-normal--34-240-100-100-p-182-iso8859-1", - #"10x20" ); my $window = $zinc->add('curve', 1, [100,100 , 300,100, 300,400 , 100,400 ], |