From bb2b3d30ba9207c51c183b3fbceb15a1564d9483 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 29 Mar 2002 13:36:32 +0000 Subject: *** empty log message *** --- sandbox/local.pl | 42 ++++++++++++++++++++++++------------------ sandbox/testbezier.pl | 12 +++++++++++- sandbox/testrelief.pl | 3 ++- sandbox/testzinc.pl | 4 +++- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/sandbox/local.pl b/sandbox/local.pl index 8a9593c..e97d7d5 100644 --- a/sandbox/local.pl +++ b/sandbox/local.pl @@ -4,13 +4,13 @@ use Tk; use Tk::Zinc; use Controls; use Tk::Photo; -require Tk::PNG; +#require Tk::PNG; $mw = MainWindow->new(); -$logo = $mw->Photo(-file => ""); +$logo = $mw->Photo(-file => "logo.gif"); $papier = $mw->Photo(-file => "texture-paper.xpm"); -$penguin = $mw->Photo(-format => 'png', - -file => "xpenguin.png"); +#$penguin = $mw->Photo(-format => 'png', +# -file => "xpenguin.png"); $top = 1; $zinc = $mw->Zinc(-render => 1, @@ -32,6 +32,7 @@ $clip = $zinc->add('arc', $gr1, [50, 50, 399, 399], -linewidth => 0); #$zinc->itemconfigure($gr1, -clip => $clip); $gr2 = $zinc->add('group', $gr1); + $clip2 = $zinc->add('rectangle', $gr2, [200, 200, 450, 300], -visible => 1, -filled => 1, @@ -39,9 +40,11 @@ $clip2 = $zinc->add('rectangle', $gr2, [200, 200, 450, 300], # -fillcolor => 'white:100|white:0', # -fillcolor => '#ffffff:15 0|#ffff00:15 50|#000000:15 100/270', # -fillcolor => 'white 0 |blue 20|blue 80|black:0 100/270', - -linewidth => 9, - -linestyle => 'dashed', +# -linewidth => 3, + -linewidth => 11, +# -linestyle => 'dashed', -linecolor => 'red'); + #$zinc->itemconfigure($gr2, -clip => $clip2); $view = $zinc->add('group', $gr2, -tags => "controls"); $zinc->lower($clip); @@ -50,28 +53,30 @@ $zinc->lower($clip2); new Controls($zinc); $rect2 = $zinc->add('rectangle', $view, [150, 50, 300, 300], - -visible => 1, + -visible => 0, -linewidth => 0, -tile => $logo, -fillcolor => 'white:50', -filled => 1); + $rect = $zinc->add('rectangle', $view, [100, 100, 200, 200], -visible => 1, - -linewidth => 4, + -linewidth => 3, +# -linewidth => 4, -linecolor => 'tan', # -fillcolor => 'pink:50', -fillcolor => 'tan', -relief => 'sunken', -filled => 1 ); - $mp = $zinc->add('curve', $view, [50, 150, 100, 250, 270, 170, 220, 100, 200, 100, 180, 0, 140, 140, 70, 0], -visible => 0, -composescale => 1, -composerotation => 1, - -linewidth => 4, + -linewidth => 3, +# -linewidth => 4, -relief => 'sunken', -closed => 1, -joinstyle => 'round', @@ -101,7 +106,8 @@ $mp2 = $zinc->add('curve', $view, [0, 320, 80, 470, 200, 470], -marker => 'AtcSymbol6', -markercolor => 'black'); $mp3 = $zinc->add('curve', $view, [20, 280, 100, 430, 200, 430], - -linewidth => 9, + -linewidth => 11, +# -linewidth => 9, -closed => 0, # -linestyle => 'dashed', -joinstyle => 'round', @@ -133,11 +139,11 @@ for ($i = 0; $i < 100; $i++) { -position => [$x, $y], -anchor => 'nw', -color => 'red:30'); } -$peng = $zinc->add('icon', $view, - -visible => 1, - -image => $penguin, -position => [300, 300], - -anchor => 'center', - -color => 'black:50'); +#$peng = $zinc->add('icon', $view, +# -visible => 1, +# -image => $penguin, -position => [300, 300], +# -anchor => 'center', +# -color => 'black:50'); $fvwm = $zinc->add('icon', $top, -visible => 1, @@ -155,7 +161,7 @@ $arc = $zinc->add('arc', $view, [-45, -45, 45, 45], -visible => 1, -fillcolor => 'boule', -linewidth => 1, -# -filled => 1, + -filled => 1, # -startangle => 0, # -extent => 360, -closed => 1, @@ -186,7 +192,7 @@ $tab = $zinc->add('tabular', $view, 10, -position => [300, 300], -labelformat => '100x50'); $zinc->itemconfigure($tab, 0, - -visible => 1, + -visible => 0, # -image => $logo, -text => 'blabla', -font => "cenapii-digistrips-b12", diff --git a/sandbox/testbezier.pl b/sandbox/testbezier.pl index 3d9fd3c..33297da 100644 --- a/sandbox/testbezier.pl +++ b/sandbox/testbezier.pl @@ -9,7 +9,7 @@ require Tk::PNG; $top = 1; -$lw = 24; +$lw = 8; $arrow = [8, 10, 6]; # @@ -118,6 +118,16 @@ foreach $current (@show) { # $zinc->remove($model); +my @coords = ( +10, 0, 40, 0, 70, 0, +70, 0, 80, 0, 80, 10, +80, 10, 80, 40, 80, 70, +80, 70, 80, 80, 70, 80, +70, 80, 40, 80, 10, 80, +10, 80, 0, 80, 0, 70, +0, 70, 0, 40, 0, 10, +0, 10, 0, 0, 10, 0); +$zinc->add('bezier', $view, \@coords); # # Some optional graphic features diff --git a/sandbox/testrelief.pl b/sandbox/testrelief.pl index 15dc0b2..79c9a31 100644 --- a/sandbox/testrelief.pl +++ b/sandbox/testrelief.pl @@ -57,9 +57,10 @@ $zinc->add('curve', $view, polypoints(700, -200, 100, 40, 0), -smoothrelief => 1, -fillcolor => 'tan', -linecolor => 'tan', + -closed => 1, -filled => 1); -$zinc->add('curve', $view, polypoints(200, -450, 100, 4, -45), +$zinc->add('curve', $view, polypoints(200, -450, 100, 7, -45), -relief => 'sunken', -linewidth => $lw, -fillcolor => 'tan', diff --git a/sandbox/testzinc.pl b/sandbox/testzinc.pl index 941d11b..2b755fd 100644 --- a/sandbox/testzinc.pl +++ b/sandbox/testzinc.pl @@ -24,7 +24,7 @@ $delay = 2000; $rate = 0.3; %tracks = (); -$zinc = $mw->Zinc(-render => 1, -backcolor => 'gray65', -relief => 'sunken'); +$zinc = $mw->Zinc(-render => 0, -backcolor => 'gray65', -relief => 'sunken'); $zinc->pack(-expand => 1, -fill => 'both'); $zinc->configure(-width => $zinc_width, -height => $zinc_height); #$radar = $top; @@ -126,6 +126,8 @@ sub create_tracks { $d = (rand() > 0.5) ? 1 : -1; $track->{'vy'} = (8.0 + rand(10.0)) * $d; $zinc->itemconfigure($item, + -lastasfirst => 1, + -symbolcolor => 'red', -position => [$track->{'x'}, $track->{'y'}], -speedvector => [$track->{'vx'}, $track->{'vy'}], -speedvectorsensitive => 1, -- cgit v1.1