aboutsummaryrefslogtreecommitdiff
path: root/demos/magicLens.tcl
diff options
context:
space:
mode:
authorlecoanet2004-03-03 10:46:30 +0000
committerlecoanet2004-03-03 10:46:30 +0000
commit2685c9ed276993781f969ce16351093c29da00d7 (patch)
tree8cb2f814162674c8828109bcc611d5cb1854c61f /demos/magicLens.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/magicLens.tcl')
-rw-r--r--demos/magicLens.tcl14
1 files changed, 6 insertions, 8 deletions
diff --git a/demos/magicLens.tcl b/demos/magicLens.tcl
index b44254b..251a902 100644
--- a/demos/magicLens.tcl
+++ b/demos/magicLens.tcl
@@ -187,8 +187,8 @@ set zinc [zinc $w.z -render 1 -width 1000 -height 900 -borderwidth 0 \
pack $w.z -fill both -expand yes
set imagePath [file join $zinc_library demos images]
-set texture [image create photo -file [file join $imagePath paper-grey1.gif]]
-set lensTexture [image create photo -file [file join $imagePath paper-grey.gif]]
+set texture [image create photo texture -file [file join $imagePath paper-grey1.gif]]
+set lensTexture [image create photo lensTexture -file [file join $imagePath paper-grey.gif]]
$zinc configure -tile $texture
# Create the views
@@ -258,10 +258,9 @@ for {set i 0} {$i < 12} {incr i} {
# Text of label (% saturation + ZnColor)
set txtColor "[expr ((10 - $c)*10)]%\n$color"
- set t [$zinc add text $lGroup -priority 200 -position {0 0} \
- -text $txtColor -anchor center -alignment center -font $font8 -spacing 2 \
- -composescale 0]
- $zinc translate $t 0 [expr ($c + 1)* 65]
+ $zinc add text $lGroup -priority 200 -position [list 0 [expr ($c + 1)* 65]] \
+ -text $txtColor -anchor center -alignment center -font $font8 -spacing 2 \
+ -composescale 0
}
incr x 80
@@ -284,12 +283,11 @@ set lensZone [$zinc clone lensback -tags lenszone]
$zinc chggroup $lensZone $lensView true
$zinc itemconfigure $lensView -clip $lensZone
-set consigne [$zinc add text 1 -position {0 0} -font $font8 -alignment left \
+set consigne [$zinc add text 1 -position {30 840} -font $font8 -alignment left \
-color \#ffffff -spacing 2 \
-text "<Up>, <Down>, <Left> and <Right> keys or <Mouse Drag>
Move the Magic Color Lens behind the color gradiants
to see the ZnColor value of Hue/saturation"]
-$zinc translate $consigne 30 840
set cClone [$zinc clone $consigne -font $font9b]
$zinc chggroup $cClone $infoView