diff options
Diffstat (limited to 'sandbox/testbitmaps.tcl')
-rw-r--r-- | sandbox/testbitmaps.tcl | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sandbox/testbitmaps.tcl b/sandbox/testbitmaps.tcl index 930d935..27a519b 100644 --- a/sandbox/testbitmaps.tcl +++ b/sandbox/testbitmaps.tcl @@ -1,13 +1,19 @@ #!/usr/local/bin/wish -f -load ../tkzinc3.2.so +lappend auto_path .. +package require Tkzinc +package require Img -set r [zinc .r -backcolor gray -relief sunken] +set r [zinc .r -render 1 -backcolor gray -relief sunken] set top 1 pack .r -expand t -fill both .r configure -width 500 -height 800 -.r add rectangle $top "30 50 80 100" -filled t -fillpattern AlphaStipple0 +set r [.r add rectangle $top "30 50 80 100" -filled t -fillpattern AlphaStipple0 -linewidth 1] +.r translate $r -55 -75 +.r rotate $r 45 +.r translate $r 55 75 + .r add text $top -position "50 110" -text "0" .r add rectangle $top "100 50 150 100" -filled t -fillpattern AlphaStipple1 .r add text $top -position "120 110" -text "1" @@ -58,3 +64,23 @@ for {set i 0} {$i < 22} {incr i} { .r add text $top -position "180 560" -text "AtcSymbol" \ -font "-*-lucida-bold-r-normal-*-14-*-*-*-*-*-*-*" + + +set im [image create bitmap toto -background "red" -file fvwm.xbm] +set icim [.r add icon 1 -image $im -position {0 0}] +.r rotate $icim 20 +.r scale $icim 1.2 1.2 +.r translate $icim 50 320 +#.r add icon 1 -image $im -position {300 10} +#.r add rectangle 1 {10 10 100 100} -tile $im -filled 1 +#$im configure -background red + +set icbit [.r add icon 1 -image @fvwm.xbm -position {100 400}] + +#.r bind $icbit <Enter> ".r itemconfigure $icbit -color red; \ +# $im configure -file fvwm.xbm -foreground black" +#.r bind $icbit <Leave> ".r itemconfigure $icbit -color black; \ +# $im configure -file trash.xbm -foreground red " + +#.r bind $icim <Enter> "$im configure -background black" +#.r bind $icim <Leave> "$im configure -background red" |