From d358343ba27af95e70968872c7fe869809c2daff Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 15 Mar 2002 13:02:42 +0000 Subject: *** empty log message *** --- sandbox/contours.tcl | 2 +- sandbox/local.pl | 19 ++++++++++--------- sandbox/testbezier.pl | 22 +++++++++++++--------- sandbox/testbezier.tcl | 3 ++- sandbox/testpoly.tcl | 3 ++- sandbox/testrect.pl | 4 ++-- sandbox/testrelief.tcl | 14 +++++++------- sandbox/zinc.tcl | 4 ++-- 8 files changed, 39 insertions(+), 32 deletions(-) (limited to 'sandbox') diff --git a/sandbox/contours.tcl b/sandbox/contours.tcl index cbddcb8..7bea39f 100644 --- a/sandbox/contours.tcl +++ b/sandbox/contours.tcl @@ -15,7 +15,7 @@ set view [.r add group $top -tags controls] #set poly [.r add curve $view "50 -150 300 -150 300 -300 50 -300 50 -150" \ # -closed t -fillcolor tan] set poly [.r add curve $view "50 -150 50 -300 300 -300 300 -150 50 -150" \ - -closed t -fillcolor tan -linewidth 2 -relief raised] + -closed t -fillcolor tan -linecolor tan -linewidth 2 -relief raised] .r scale $poly 2.0 2.0 .r translate $poly -60 150 set rect [.r add rectangle $view "50 -200 100 -50"] diff --git a/sandbox/local.pl b/sandbox/local.pl index 2e2e9df..8a9593c 100644 --- a/sandbox/local.pl +++ b/sandbox/local.pl @@ -7,14 +7,14 @@ use Tk::Photo; require Tk::PNG; $mw = MainWindow->new(); -$logo = $mw->Photo(-file => "logo.gif"); +$logo = $mw->Photo(-file => ""); $papier = $mw->Photo(-file => "texture-paper.xpm"); $penguin = $mw->Photo(-format => 'png', -file => "xpenguin.png"); $top = 1; $zinc = $mw->Zinc(-render => 1, - -borderwidth => 0, + -borderwidth => 5, -highlightthickness => 0, -relief => 'sunken', -takefocus => 1, @@ -58,7 +58,7 @@ $rect2 = $zinc->add('rectangle', $view, [150, 50, 300, 300], $rect = $zinc->add('rectangle', $view, [100, 100, 200, 200], -visible => 1, -linewidth => 4, - -linecolor => 'black:100', + -linecolor => 'tan', # -fillcolor => 'pink:50', -fillcolor => 'tan', -relief => 'sunken', @@ -156,11 +156,11 @@ $arc = $zinc->add('arc', $view, [-45, -45, 45, 45], -fillcolor => 'boule', -linewidth => 1, # -filled => 1, - -startangle => 0, - -extent => 240, - -closed => 0, - -firstend => [12, 12, 8], - -lastend => [12, 12, 8], +# -startangle => 0, +# -extent => 360, + -closed => 1, +# -firstend => [12, 12, 8], +# -lastend => [12, 12, 8], # -tile => $logo, -pieslice => 0 ); @@ -191,7 +191,7 @@ $zinc->itemconfigure($tab, 0, -text => 'blabla', -font => "cenapii-digistrips-b12", -border => ['contour'], - -bordercolor => 'black', + -bordercolor => 'tan', -filled => 1, -tile => $papier, -reliefthickness => 4, @@ -208,4 +208,5 @@ $mw->Tk::bind('

', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" }) $mw->Tk::bind('', sub { $zinc->remove($arc); }); $mw->Tk::bind('', sub { exit(0); }); $zinc->focusFollowsMouse(); + MainLoop(); diff --git a/sandbox/testbezier.pl b/sandbox/testbezier.pl index 9ad39d2..3d9fd3c 100644 --- a/sandbox/testbezier.pl +++ b/sandbox/testbezier.pl @@ -9,7 +9,7 @@ require Tk::PNG; $top = 1; -$lw = 8; +$lw = 24; $arrow = [8, 10, 6]; # @@ -23,10 +23,12 @@ $arrow = [8, 10, 6]; ['round', 0, 1, 'raised', 'Raised'], ['round', 0, 1, 'groove', 'Groove'], ['round', 0, 1, 'ridge', 'Ridge'], - ['round', 1, 1, 'sunken', 'FilledSunken'], - ['round', 1, 1, 'raised', 'FilledRaised'], - ['round', 1, 1, 'groove', 'FilledGroove'], - ['round', 1, 1, 'ridge', 'FilledRidge'], + ['round', 1, 1, 'roundsunken', 'RoundSunken'], + ['round', 1, 1, 'roundraised', 'RoundRaised'], + ['round', 1, 1, 'roundgroove', 'RoundGroove'], + ['round', 1, 1, 'roundridge', 'RoundRidge'], + ['round', 1, 1, 'sunkenrule', 'SunkenRule'], + ['round', 1, 1, 'raisedrule', 'RaisedRule'], ['round', 1, 0, 'flat', 'Fill'], ['round', 1, 1, 'flat', 'FillBorder']); @@ -35,11 +37,13 @@ $mw = MainWindow->new(); $papier = $mw->Photo(-file => "texture-paper.xpm"); $zinc = $mw->Zinc(-render => 1, + -lightangle => 120, -borderwidth => 0, -highlightthickness => 0, -relief => 'sunken', -takefocus => 1, - -tile => $papier + -backcolor => 'red' + # -tile => $papier ); $zinc->pack(-expand => 1, -fill => 'both'); $zinc->configure(-width => 500, -height => 500); @@ -69,8 +73,7 @@ $mp = $zinc->add('bezier', $model, [50, -150, 180, -300, 140, -160, 70, -300], - -linecolor => 'yellow', - -fillcolor => 'tan:50', + -fillcolor => 'tan', -tags => 'bezier', -linewidth =>$lw); #$zinc->add('rectangle', $model, [50, -150, 100, -50]); @@ -99,7 +102,8 @@ foreach $current (@show) { -capstyle => $cap, -filled => $filled, -linewidth => $border ? $lw : 0, - -relief => $relief); + -relief => $relief, + -linecolor => $relief eq 'flat' ? 'yellow' : 'tan'); $zinc->itemconfigure($zinc->find('withtag', 'title', $grp), -text => $title); $col++; diff --git a/sandbox/testbezier.tcl b/sandbox/testbezier.tcl index 528ddac..eddb2b9 100644 --- a/sandbox/testbezier.tcl +++ b/sandbox/testbezier.tcl @@ -61,7 +61,8 @@ foreach current $show { .r translate $grp [expr $col * 240] [expr $row * (-290 - (2 * $lw))] .r itemconfigure [.r find withtag "bezier" $grp] \ -capstyle $cap -filled $filled \ - -linewidth [expr $border ? $lw : 0] -relief $relief + -linewidth [expr $border ? $lw : 0] \ + -relief $relief -linecolor [expr $relief == flat ? yellow : tan] .r itemconfigure [.r find withtag "title" $grp] -text $title incr col if {$col >= 4} { diff --git a/sandbox/testpoly.tcl b/sandbox/testpoly.tcl index b8330e5..09209e8 100644 --- a/sandbox/testpoly.tcl +++ b/sandbox/testpoly.tcl @@ -65,7 +65,8 @@ foreach current $show { .r translate $grp [expr $col * 240] [expr $row * (-290 - (2 * $lw))] .r itemconfigure [.r find withtag "poly" $grp] \ -capstyle $cap -joinstyle $join -filled $filled \ - -linewidth [expr $border ? $lw : 0] -relief $relief + -linewidth [expr $border ? $lw : 0] -relief $relief \ + -linecolor [expr $relief == flat ? yellow : tan] .r itemconfigure [.r find withtag "title" $grp] -text $title incr col if {$col >= 4} { diff --git a/sandbox/testrect.pl b/sandbox/testrect.pl index aac1959..8a4d399 100644 --- a/sandbox/testrect.pl +++ b/sandbox/testrect.pl @@ -82,12 +82,12 @@ sub adjustcontrol { # #set rect2 [.r add rectangle $view "202 -320 302 -350" -filled t -fillcolor darkgray -linewidth 2] -#set rect3 [.r add rectangle $view "250 -100 350 -300" -filled t -relief raised -linewidth 4 -fillcolor "white|cadetblue3"] +#set rect3 [.r add rectangle $view "250 -100 350 -300" -filled t -relief raised -linewidth 4 -fillcolor "white|cadetblue3" -linecolor white] #set rect4 [.r add rectangle $view2 "0 0 101 -81" -linewidth 2 -linecolor darkgray -filled t] #.r itemconfigure $rect4 -fillcolor "white|darkslateblue" -#set rect5 [.r add rectangle $view2 "0 0 101 -81" -linewidth 2 -linecolor darkgray -filled t -fillcolor blue -relief sunken] +#set rect5 [.r add rectangle $view2 "0 0 101 -81" -linewidth 2 -linecolor blue -filled t -fillcolor blue -relief sunken] #.r translate $rect5 0 -90 diff --git a/sandbox/testrelief.tcl b/sandbox/testrelief.tcl index 082bae8..782a0f1 100644 --- a/sandbox/testrelief.tcl +++ b/sandbox/testrelief.tcl @@ -1,11 +1,11 @@ #!/usr/bin/wish8.0 -f -load tkzinc3.1.so +load tkzinc3.2.so set top 1 set lw 8 -set r [zinc .r -backcolor gray -relief sunken -lightangle 155] +set r [zinc .r -backcolor gray -relief sunken -lightangle 120 -render 1] pack .r -expand t -fill both .r configure -width 1024 -height 800 .r scale $top 1 -1 @@ -26,20 +26,20 @@ proc polypoints { ox oy rad n startangle } { } set poly [ .r add curve $view [polypoints 200 -200 100 40 0] \ - -relief raised -linewidth $lw \ - -fillcolor lightblue -filled t] + -relief raised -linewidth $lw -smoothrelief 1 \ + -fillcolor lightblue -linecolor lightblue -filled t] set poly [ .r add curve $view [polypoints 450 -200 100 40 0] \ -relief raised -linewidth $lw \ - -fillcolor tan -filled t] + -fillcolor tan -linecolor tan -filled t] set poly [ .r add curve $view [polypoints 700 -200 100 40 0] \ -relief sunken -linewidth $lw \ - -fillcolor tan -filled t] + -fillcolor tan -linecolor tan -filled t] set poly [ .r add curve $view [polypoints 200 -450 100 4 -45] \ -relief sunken -linewidth $lw \ - -fillcolor tan -filled t] + -fillcolor tan -linecolor tan -filled t] source "controls.tcl" diff --git a/sandbox/zinc.tcl b/sandbox/zinc.tcl index 74a76f0..ecbab54 100644 --- a/sandbox/zinc.tcl +++ b/sandbox/zinc.tcl @@ -95,8 +95,8 @@ set track [.r add track $view 6 -tags track -leaderanchors "|0|0"] -markerfillpattern AlphaStipple4 \ -markercolor salmon .r itemconfigure $track -labelformat "120x40 l0l0+0+0 x80x20+0+0 x40x20+80+0 x40x20+0+20 x20x20>3>2 x60x20>1>1" -.r itemconfigure $track 0 -filled 1 -backcolor gray -relief groove -.r itemconfigure $track 1 -filled 1 -backcolor tan -relief groove \ +.r itemconfigure $track 0 -filled 1 -backcolor gray -bordercolor gray -relief groove +.r itemconfigure $track 1 -filled 1 -backcolor tan -bordercolot tan -relief groove \ -font "cenapii-etiquette-m17" -text "AFR451" .r itemconfigure $track 2 -text "WPY" \ -font "cenapii-etiquette-m17" -- cgit v1.1