diff options
author | lecoanet | 2004-03-03 10:46:30 +0000 |
---|---|---|
committer | lecoanet | 2004-03-03 10:46:30 +0000 |
commit | 2685c9ed276993781f969ce16351093c29da00d7 (patch) | |
tree | 8cb2f814162674c8828109bcc611d5cb1854c61f /demos/magicLens.tcl | |
parent | e3bb24569b85ff5fea4dcc3eb10e86ae59608967 (diff) | |
download | tkzinc-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.tcl | 14 |
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 |