aboutsummaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/testicon.tcl10
1 files changed, 6 insertions, 4 deletions
diff --git a/sandbox/testicon.tcl b/sandbox/testicon.tcl
index 6c1b8bf..fd8ba39 100644
--- a/sandbox/testicon.tcl
+++ b/sandbox/testicon.tcl
@@ -10,7 +10,7 @@ image create photo bouton -file bouton.xpm
image create photo boutond -file bouton-down.xpm
set mask "fvwm.xbm"
-set r [zinc .r -backcolor gray -relief sunken -render 0]
+set r [zinc .r -backcolor gray -relief sunken -render 1 -borderwidth 20]
pack .r -expand t -fill both
.r configure -width 800 -height 500
#.r configure -drawbboxes t
@@ -20,7 +20,7 @@ set view [.r add group $top -tags "controls"]
proc maskicon {x y group mask color anchor} {
.r add icon $group -mask "@$mask" -position "$x $y" -anchor $anchor -color $color
.r add rectangle $group [list [expr $x - 3.0] [expr $y - 3.0] \
- [expr $x + 3.0] [expr $y + 3.0]] -filled 1 -fillcolor red
+ [expr $x + 3.0] [expr $y + 3.0]] -filled 1 -fillcolor red
}
proc imageicon {x y group image anchor} {
@@ -56,14 +56,16 @@ imageicon $x2 $y2 $view penguin center
.r add icon $view -image bouton -position "$x2 $y2" -anchor center
.r add icon $view -image boutond -position [list [expr $x2 + 50] $y2] -anchor center
+.r add text $view -text essai -position "$x2 $y2"
#
# Clip
#
puts "crée les clips"
-set clip [.r add rectangle $view "50 -300 600 -10" -filled t \
+set clip [.r add rectangle $view "50 -10 600 -300" -filled t \
-linewidth 0 -fillcolor darkgray]
-#.r rotate $clip [expr 3.14159 / 4]
+#.r rotate $clip [expr 3.14159 / 4]; #bug le rectangle forme un bonnet
+# d'ane sous certains angles.
.r lower $clip
.r itemconfigure $view -clip $clip