aboutsummaryrefslogtreecommitdiff
path: root/demos/curveBezier.tcl
diff options
context:
space:
mode:
authorlecoanet2004-03-03 10:46:30 +0000
committerlecoanet2004-03-03 10:46:30 +0000
commit2685c9ed276993781f969ce16351093c29da00d7 (patch)
tree8cb2f814162674c8828109bcc611d5cb1854c61f /demos/curveBezier.tcl
parente3bb24569b85ff5fea4dcc3eb10e86ae59608967 (diff)
downloadtkzinc-2685c9ed276993781f969ce16351093c29da00d7.zip
tkzinc-2685c9ed276993781f969ce16351093c29da00d7.tar.gz
tkzinc-2685c9ed276993781f969ce16351093c29da00d7.tar.bz2
tkzinc-2685c9ed276993781f969ce16351093c29da00d7.tar.xz
Adjustments for -position
Diffstat (limited to 'demos/curveBezier.tcl')
-rw-r--r--demos/curveBezier.tcl18
1 files changed, 6 insertions, 12 deletions
diff --git a/demos/curveBezier.tcl b/demos/curveBezier.tcl
index a26f5b8..8531ce0 100644
--- a/demos/curveBezier.tcl
+++ b/demos/curveBezier.tcl
@@ -46,8 +46,7 @@ $w.zinc add text $group -position {50 20} -anchor w -color $textColor \
-text {Examples of curve items using cubic bezier control points}
## Please note: much of the items below could be computed
-set t [$w.zinc add text $group -anchor w -tags bezier1 -color $textColor -width 270]
-$w.zinc translate $t 25 270
+$w.zinc add text $group -anchor w -position {25 270} -tags bezier1 -color $textColor -width 270
$w.zinc add curve $group {100 200 100 100} -tags {line1 l1-2} \
-linecolor $barColor -filled 0 -linewidth 2
$w.zinc add curve $group {400 100 400 200} -tags {line1 l3-4} \
@@ -63,8 +62,7 @@ $w.zinc add arc $group {390 90 410 110} -tags {handle1 p3} -filled 1 \
$w.zinc add arc $group {390 190 410 210} -tags {handle1 p4} -filled 1 \
-fillcolor \#BBBBBB
-set t [$w.zinc add text $group -anchor w -tags bezier2 -color $textColor -width 270]
-$w.zinc translate $t 570 270
+$w.zinc add text $group -anchor w -position {570 270} -tags bezier2 -color $textColor -width 270
$w.zinc add curve $group {600 200 675 100} -tags {line2 l1-2} \
-linecolor $barColor -linewidth 2
$w.zinc add curve $group {975 100 900 200} -tags {line2 l3-4} \
@@ -80,8 +78,7 @@ $w.zinc add arc $group {965 90 985 110} -tags {handle2 p3} -filled 1 \
$w.zinc add arc $group {890 190 910 210} -tags {handle2 p4} -filled 1 \
-fillcolor $handleColor
-set t [$w.zinc add text $group -anchor w -tags bezier3 -color $textColor -width 270]
-$w.zinc translate $t 25 570
+$w.zinc add text $group -anchor w -position {25 570} -tags bezier3 -color $textColor -width 270
$w.zinc add curve $group {100 500 25 400} -tags {line3 l1-2} \
-linecolor $barColor -linewidth 2
$w.zinc add curve $group {475 400 400 500} -tags {line3 l3-4} \
@@ -97,8 +94,7 @@ $w.zinc add arc $group {465 390 485 410} -tags {handle3 p3} -filled 1 \
$w.zinc add arc $group {390 490 410 510} -tags {handle3 p4} -filled 1 \
-fillcolor $handleColor
-set t [$w.zinc add text $group -anchor w -tags bezier4 -color $textColor -width 270]
-$w.zinc translate $t 570 570
+$w.zinc add text $group -anchor w -position {570 570} -tags bezier4 -color $textColor -width 270
$w.zinc add curve $group {600 500 600 350} -tags {line4 l1-2} \
-linecolor $barColor -linewidth 2
$w.zinc add curve $group {900 650 900 500} -tags {line4 l3-4} \
@@ -114,8 +110,7 @@ $w.zinc add arc $group {890 640 910 660} -tags {handle4 p3} -filled 1 \
$w.zinc add arc $group {890 490 910 510} -tags {handle4 p4} -filled 1 \
-fillcolor $handleColor
-set t [$w.zinc add text $group -anchor w -tags bezier5 -color $textColor -width 270]
-$w.zinc translate $t 25 870
+$w.zinc add text $group -anchor w -position {25 870} -tags bezier5 -color $textColor -width 270
$w.zinc add curve $group {100 800 175 700} -tags {line5 l1-2} \
-linecolor $barColor -filled 0 -linewidth 2
$w.zinc add curve $group {325 700 400 800} -tags {line5 l3-4} \
@@ -131,8 +126,7 @@ $w.zinc add arc $group {315 690 335 710} -tags {handle5 p3} -filled 1 \
$w.zinc add arc $group {390 790 410 810} -tags {handle5 p4} -filled 1 \
-fillcolor $handleColor
-set t [$w.zinc add text $group -anchor w -tags bezier6 -color $textColor -width 280]
-$w.zinc translate $t 570 970
+$w.zinc add text $group -anchor w -position {570 970} -tags bezier6 -color $textColor -width 280
$w.zinc add curve $group {600 800 625 700} -tags {line6 l1-2} \
-linecolor $barColor -linewidth 2
$w.zinc add curve $group {725 700 750 800} -tags {line6 l3-4} \