From 168da20e4c3a6f298cba04b06759eb1a29ce2058 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 26 Nov 2001 10:29:24 +0000 Subject: *** empty log message *** --- sandbox/local.pl | 20 ++++++++++++++++---- sandbox/testshape.tcl | 20 +++++++++----------- 2 files changed, 25 insertions(+), 15 deletions(-) (limited to 'sandbox') diff --git a/sandbox/local.pl b/sandbox/local.pl index 30bed65..94f1fa5 100644 --- a/sandbox/local.pl +++ b/sandbox/local.pl @@ -19,7 +19,8 @@ $zinc = $mw->Zinc(-render => 1, $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], +#$clip = $zinc->add('rectangle', $gr1, [50, 50, 399, 399], +$clip = $zinc->add('arc', $gr1, [50, 50, 399, 399], -filled => 1, -fillcolor => 'Pink:40', # -fillpattern => 'AlphaStipple4', @@ -52,10 +53,11 @@ $rect = $zinc->add('rectangle', $view, [100, 100, 200, 200], # -fillcolor => 'pink:50', -fillcolor => 'tan', -relief => 'sunken', - -filled => 1); + -filled => 1 + ); $mp = $zinc->add('curve', $view, [50, 50, 100, 150, 270, 70, - 220, 0, 200, 20, 180, -100, + 220, 0, 200, 0, 180, -100, 140, 40, 70, -100], -visible => 1, -composescale => 1, @@ -67,7 +69,7 @@ $mp = $zinc->add('curve', $view, [50, 50, 100, 150, 270, 70, -linecolor => 'black', -linealpha => 50, -filled => 1, - -fillcolor => 'white|black(10 10', + -fillcolor => 'white|black[100 100', # -fillcolor => 'white', # -fillpattern => 'AlphaStipple8', # -tile => $papier, @@ -122,9 +124,11 @@ $fvwm = $zinc->add('icon', $top, -color => 'orange', -alpha => 100); +#$zinc->gname('white 0 80|black[0 0', 'cone'); $zinc->gname('white:50 0 80|black 30|white 100(0 0', 'oeil'); $zinc->gname('white:100|black:100(-20 -15', 'boule'); $zinc->gname('white:100|black:100(-15 -100', 'arrondi'); +$zinc->gname('white:100|black:100/45', 'cyl'); $arc = $zinc->add('arc', $view, [-45, -45, 45, 45], -visible => 1, -fillcolor => 'boule', @@ -136,6 +140,12 @@ $arc = $zinc->add('arc', $view, [-45, -45, 45, 45], # -tile => $logo, -pieslice => 0 ); +$zinc->add('rectangle', $view, [100, 100, 200, 200], + -fillcolor => 'cyl', + -linewidth => 1, + -filled => 1, + -visible => 0 + ); $zinc->translate($arc, 125, 300); @@ -168,6 +178,8 @@ $zinc->translate($rect, -150, -150); $zinc->rotate($rect, 35); $zinc->translate($rect, 150, 150); +$zinc->monitor(1); +$mw->Tk::bind('

', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" }); $mw->Tk::bind('', sub { $zinc->remove($arc); }); $mw->Tk::bind('', sub { exit(0); }); diff --git a/sandbox/testshape.tcl b/sandbox/testshape.tcl index 424d057..b0a5b6d 100644 --- a/sandbox/testshape.tcl +++ b/sandbox/testshape.tcl @@ -1,20 +1,18 @@ -#!/usr/bin/wish -f +#!/usr/bin/wish8.0 -f -load tkzinc3.1.so +load /pii/packages/common/zinc/tkzinc_debug3.2.so set top 1 -set r [zinc .r] +set r [zinc .r -render 0 -borderwidth 0 -fullreshape 0 -relief sunken] pack $r -expand t -fill both -$r configure -width 800 -height 500 +$r configure -width 500 -height 500 -set view [$r add group $top] +set arc [.r add arc $top "50 50 200 150" -visible 1 -closed 0 -filled 0 -fillcolor white -extent 200 -pieslice 0] -set tab1 [$r add tabular $view 10 -position "100 100" -labelformat "100x30"] -set tab2 [$r add tabular $view 10 -position "100 150" -labelformat "100x30"] -set tab3 [$r add tabular $view 10 -connecteditem $tab2 -labelformat "100x30"] +set cv [.r add curve $top "50 50 100 150 270 70 220 0 200 20 180 -100 140 40 70 -100" \ + -visible 0] -$r itemconfigure $tab1 0 -text "tab1" -$r itemconfigure $tab2 0 -text "tab2" -$r itemconfigure $tab3 0 -text "tab3" +.r rotate $arc [expr 3.14/10] 125 100 +.r itemconfigure $top -clip $cv -- cgit v1.1