File: RgbaImage-test.tk

package info (click to toggle)
xmorph 1%3A20011220
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,468 kB
  • ctags: 1,534
  • sloc: ansic: 16,401; sh: 2,651; makefile: 556; tcl: 516
file content (24 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/local/bin/wish4.2

load ./morph.so

# Create a RgbaImage
RgbaImageT rgba_img_1

# Fill the RgbaImage with a test image
rgba_img_1 reset 1

# Create the Tk PhotoImage
set photo_img_1 [ image create photo ]

# Convert the RgbaImage to a Tk PhotoImage
rgba_img_1 toPhoto $photo_img_1

# Create a canvas to hold the PhotoImage
canvas .c

# Place the PhotoImage in the canvas
.c create image 0 0 -image $photo_img_1 -anchor nw

# Display the canvas
pack .c