-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathraster.tcl
49 lines (43 loc) · 1.36 KB
/
raster.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# heuristics to discover location of TCL/Tk libraries, as many
# implementations of TCL/Tk are broken.
if {$tcl_platform(platform)=="windows"} {
set cygp [open {|cygpath -w /} "r"]
set cygpath [gets $cygp]
set tcl_library [lindex \
[glob $cygpath/usr/share/tcl $cygpath/usr/share/tcl\[0-9\]*] \
0]
set tk_library [lindex \
[glob $cygpath/usr/share/tk $cygpath/usr/share/tk\[0-9\]*] \
0]
close $cygp
}
if {! [info exists tcl_library]} {
if [info exists env(TCL_LIBRARY)] {set tcl_library $env(TCL_LIBRARY)} {
set tcl_library [lindex \
[glob ~/usr/lib/tcl ~/usr/lib/tcl\[0-9\]* /usr/lib/tcl \
/usr/lib/tcl\[0-9\]* /usr/local/lib/tcl \
/usr/local/lib/tcl\[0-9\]* \
/usr/share/tcl /usr/share/tcl\[0-9\]*
] \
0]
}
}
if {! [info exists tk_library]} {
if [info exists env(TK_LIBRARY)] {set tk_library $env(TK_LIBRARY)} {
set tk_library [lindex \
[glob ~/usr/lib/tk ~/usr/lib/tk\[0-9\]* /usr/lib/tk \
/usr/lib/tk\[0-9\]* /usr/local/lib/tk \
/usr/local/lib/tk\[0-9\]*\
/usr/share/tk /usr/share/tk\[0-9\]*
]\
0]
}
}
source [info library]/init.tcl
source $tk_library/tk.tcl
button .resume -text "resume" -command {global paused; set paused false;}
#button .resume -text "resume" -command exit
canvas .raster
pack .resume .raster -in .
image create photo .pixmap
.raster create image 0 0 -image .pixmap -anchor nw