diff options
Diffstat (limited to 'sandbox/local.pl')
-rw-r--r-- | sandbox/local.pl | 147 |
1 files changed, 119 insertions, 28 deletions
diff --git a/sandbox/local.pl b/sandbox/local.pl index 80505d8..a1e981e 100644 --- a/sandbox/local.pl +++ b/sandbox/local.pl @@ -3,60 +3,151 @@ use Tk; use Tk::Zinc; use Controls; - +require Tk::PNG; + $mw = MainWindow->new(); $logo = $mw->Photo(-file => "logo.gif"); $papier = $mw->Photo(-file => "texture-paper.xpm"); -#$penguin = $mw->Photo(-file => "xpenguin.png"); +$penguin = $mw->Photo(-format => 'png', + -file => "xpenguin.png"); $top = 1; -$zinc = $mw->Zinc(-render => 1, - -relief => 'sunken'); +$zinc = $mw->Zinc(-render => 0, + -borderwidth => 0, + -relief => 'sunken', + -tile => $papier); $zinc->pack(-expand => 1, -fill => 'both'); $zinc->configure(-width => 500, -height => 500); $gr1 = $zinc->add('group', $top); $clip = $zinc->add('rectangle', $gr1, [50, 50, 399, 399], - -filled => 1, -fillcolor => 'pink', -linewidth => 0); -$zinc->itemconfigure($gr1, -clip => $clip); + -filled => 1, + -fillcolor => 'Pink:40', +# -fillpattern => 'AlphaStipple4', + -linewidth => 0); +#$zinc->itemconfigure($gr1, -clip => $clip); $gr2 = $zinc->add('group', $gr1); $clip2 = $zinc->add('rectangle', $gr2, [200, 200, 450, 450], - -filled => 1, -fillcolor => 'lavender', -linewidth => 0); + -filled => 1, + -fillcolor => 'white:100|white:0', +# -fillcolor => 'white 0 |blue 20|blue 80|black:0 100/270', + -linewidth => 0); #$zinc->itemconfigure($gr2, -clip => $clip2); $view = $zinc->add('group', $gr2, -tags => "controls"); $zinc->lower($clip); $zinc->lower($clip2); +new Controls($zinc); + +$rect2 = $zinc->add('rectangle', $view, [150, 50, 300, 300], + -linewidth => 0, + -tile => $logo, + -fillcolor => 'white:50', + -filled => 1); $rect = $zinc->add('rectangle', $view, [100, 100, 200, 200], -linewidth => 4, # -tile => $papier, - -fillcolor => 'pink', -fillalpha => 128, + -linealpha => 20, + -fillcolor => 'pink:50', -filled => 1); -$fvwm = $zinc->add('icon', $view, - -mask => '@fvwm.xbm', -position => [250, 120], - -anchor => 'center', -color => 'black', - -alpha => 255); -#$rect2 = $zinc->add('rectangle', $view, [150, 50, 300, 300], -# -linewidth => 0, -tile => $logo, -# -fillcolor => 'white', -fillalpha => 90, -# -filled => 1); +$mp = $zinc->add('curve', $view, [50, 50, 100, 150, 270, 70, + 220, 0, 200, 20, 180, -100, + 140, 40, 70, -100], + -linewidth => 2, + -closed => 1, + -joinstyle => 'round', + -linecolor => 'black', + -linealpha => 50, + -filled => 1, + -fillcolor => 'white|black(10 10', +# -fillcolor => 'white', +# -fillpattern => 'AlphaStipple8', +# -tile => $papier, + -marker => '', + -markercolor => 'red'); + +$mp2 = $zinc->add('curve', $view, [100, 300, 200, 300], + -linewidth => 10, + -closed => 0, + -joinstyle => 'round', + -linecolor => 'tan', + -linealpha => 50, + -filled => 1, +# -fillcolor => 'white|black(10 10', + -fillcolor => 'wheat', +# -fillpattern => 'AlphaStipple8', +# -tile => $papier, + -marker => '', + -markercolor => 'red'); + +$zinc->add('reticle', $view, + -position => [300, 300], + -firstradius => 60, + -stepsize => 30, +# -numcircles => 7, + -linecolor => 'gray30', + -brightlinecolor => 'gray100', +# -brightlinestyle => 'mixed' + ); + $x = 100; -$y = 100; -for ($i = 0; $i < 1; $i++) { - $x = $x+3; - $y = $y+3; +$y = 20; +for ($i = 0; $i < 100; $i++) { + $x = $x+5; + $y = $y+7; $zinc->add('text', $view, -text => "BlaBla et tout et tout, bref...", -position => [$x, $y], -anchor => 'nw', - -color => 'red', -alpha => 90); + -color => 'red', -alpha => 30); } -#$peng = $zinc->add('icon', $view, -# -image => $penguin, -position => [300, 300], -# -anchor => 'center', -alpha => 128); +$peng = $zinc->add('icon', $view, + -image => $penguin, -position => [300, 300], + -anchor => 'center', + -alpha => 50); + +$fvwm = $zinc->add('icon', $top, + -mask => '@fvwm.xbm', + -position => [50, 20], + -anchor => 'center', + -color => 'orange', + -alpha => 100); + +$arc = $zinc->add('arc', $view, [-45, -45, 45, 45], + -fillcolor => 'white:50 0 80|black 30|white 100(0 0', + -linewidth => 1, + -filled => 1, + -startangle => 0, +# -extent => 240, + -closed => 1, +# -tile => $logo, + -pieslice => 0 + ); +$zinc->translate($arc, 125, 55); + +#$arc2 = $zinc->add('arc', $view, [-65, -35, 65, 35], +# -fillcolor => 'black|white(0 0', +# -linewidth => 1, +# -filled => 1); +#$zinc->translate($arc2, 125, 55); + +#$zinc->raise($fvwm); + +$tab = $zinc->add('tabular', $view, 10, + -position => [300, 300], + -labelformat => '100x50'); +$zinc->itemconfigure($tab, 0, + -image => $logo, + -text => 'blabla', + -font => "cenapii-digistrips-b12", + -border => ['contour', 'oblique', 'counteroblique'], + -bordercolor => 'black', + -filled => 1, +# -tile => $papier, + -reliefthickness => 3, + -relief => 'sunken', + -backcolor => 'white'); +$zinc->raise($tab); + $zinc->translate($rect, -150, -150); $zinc->rotate($rect, 35); $zinc->translate($rect, 150, 150); -#source controls.tcl -# -new Controls($zinc); - MainLoop(); |