aboutsummaryrefslogtreecommitdiff
path: root/demos/colorCircular.tcl
diff options
context:
space:
mode:
authorlecoanet2003-04-16 09:43:32 +0000
committerlecoanet2003-04-16 09:43:32 +0000
commiteed2656db0adae2c234c3d74af0913746ed5c444 (patch)
treef2821633165f1caf635a7e77708aeda998786c10 /demos/colorCircular.tcl
parentc0dc6e04d97b53185eda9bbd68900eba15ae1f84 (diff)
downloadtkzinc-eed2656db0adae2c234c3d74af0913746ed5c444.zip
tkzinc-eed2656db0adae2c234c3d74af0913746ed5c444.tar.gz
tkzinc-eed2656db0adae2c234c3d74af0913746ed5c444.tar.bz2
tkzinc-eed2656db0adae2c234c3d74af0913746ed5c444.tar.xz
Many updates for the 3.2.90 release and new demos
Diffstat (limited to 'demos/colorCircular.tcl')
-rw-r--r--demos/colorCircular.tcl41
1 files changed, 27 insertions, 14 deletions
diff --git a/demos/colorCircular.tcl b/demos/colorCircular.tcl
index 016e02d..63041c2 100644
--- a/demos/colorCircular.tcl
+++ b/demos/colorCircular.tcl
@@ -17,31 +17,44 @@ button $w.buttons.dismiss -text Dismiss -command "destroy $w"
button $w.buttons.code -text "See Code" -command "showCode $w"
pack $w.buttons.dismiss $w.buttons.code -side left -expand 1
-set defaultfont "-adobe-helvetica-bold-r-normal-*-120-*-*-*-*-*-*"
+set defaultfont [font create -family Helvetica -size 10 -weight bold]
+
zinc $w.zinc -width 700 -height 600 -borderwidth 3 -relief sunken -render 1
pack $w.zinc
-$w.zinc add rectangle 1 {10 10 80 80} -fillcolor {red|blue 50 50} -filled 1
-$w.zinc add text 1 -font $defaultfont -text "Radial variation from non-transparent red to non-transparent blue\nin a squarre. The gradient starts from the lower right corner.\n" -anchor nw -position {120 20}
-$w.zinc add arc 1 {10 110 90 190} -fillcolor {red;40|blue;40 0 25} -filled 1
+$w.zinc add rectangle 1 {10 10 80 80} -fillcolor {=radial 50 50|red|blue} -filled 1
+$w.zinc add text 1 -font $defaultfont -text {Radial variation from non-transparent red to non-transparent blue in a square.
+The gradient starts in the lower right corner.} -anchor nw -position {120 20}
+
+$w.zinc add arc 1 {10 110 90 190} -fillcolor {=radial 0 25|red;40|blue;40} -filled 1
-$w.zinc add text 1 -font $defaultfont -text "Radial variation from 40%transparent red to 40% transparent blue\nin a disc. The gradient starts in the middle between\nthe center on the bottom point" -anchor nw -position {120 120}
+$w.zinc add text 1 -font $defaultfont -text {Radial variation from 40% transparent red to 40% transparent blue in a disc.
+The gradient starts mid way between the center and the bottom.} \
+ -anchor nw -position {120 120}
-$w.zinc add arc 1 {10 210 90 290} -fillcolor {red;40|green;40 50|blue;40 0 0} -filled 1
+$w.zinc add arc 1 {10 210 90 290} -fillcolor {=radial 0 0|red;40|green;40 50|blue;40} -filled 1
-$w.zinc add text 1 -font $defaultfont -text "A variation from 40%transparent red to 40% transparent blue.\nthrough a 40%green on the middle of the disc. The gradient is centered." -anchor nw -position {120 220}
+$w.zinc add text 1 -font $defaultfont -text {A variation from 40% transparent red to 40% transparent blue
+through 40% green in the middle of the disc. The gradient is centered.} \
+ -anchor nw -position {120 220}
-$w.zinc add text 1 -font $defaultfont -text "Two overlaping radialy transparently colored items on a white background" -anchor nw -position {20 320}
+$w.zinc add text 1 -font $defaultfont -text {Two overlapping items filled by a transparent radial gradient on a white background.
+On the right three gradient filled ovals, note the warped gradients following the ovals.} -anchor w -position {20 320}
$w.zinc add rectangle 1 {10 340 690 590} -fillcolor white -filled 1
-$w.zinc add rectangle 1 {20 365 220 565} -fillcolor {red;40|green;40 50|blue;40 0 0} -filled 1
+$w.zinc add rectangle 1 {20 365 220 565} -fillcolor {=radial 0 0|red;40|green;40 50|blue;40} -filled 1
-$w.zinc add arc 1 {150 365 350 565} -fillcolor {yellow;40|black;40 50|cyan;40 0 0} -filled 1
+$w.zinc add arc 1 {150 365 350 565} -fillcolor {=radial 0 0|yellow;40|black;40 50|cyan;40} -filled 1
-$w.zinc add arc 1 {280 365 480 565} -fillcolor {black;100|black;100 20|white;40 0 0} -filled 1 -linewidth 0
+$w.zinc add arc 1 {280 365 480 565} -fillcolor {=radial 0 0|black;100|black;100 20|mistyrose;40} -filled 1 -linewidth 0
-$w.zinc add arc 1 {480 365 580 500} -fillcolor {black;100|white;40 -10 16} -filled 1
+set warc [$w.zinc add arc 1 {-50 -50 50 50} \
+ -fillcolor {=radial -10 16|black;80|blue;20 90 100} -filled 1]
+$w.zinc scale $warc 1.5 1
+$w.zinc translate $warc 500 432
-$w.zinc add arc 1 {580 410 680 580} -fillcolor {black;70|white;20 -40 -40} -filled 1
-$w.zinc add arc 1 {580 410 680 580} -fillcolor {black;70|white;20 40 40} -filled 1 \ No newline at end of file
+set warc [$w.zinc add arc 1 {-50 -50 50 50} \
+ -fillcolor {=radial 0 20|black;70|green;20} -filled 1]
+$w.zinc scale $warc 1 1.5
+$w.zinc translate $warc 630 432