1# This file creates a screen to exercise Postscript generation 2# for bitmaps in canvases. It is part of the Tk visual test suite, 3# which is invoked via the "visual" script. 4# 5# RCS: @(#) $Id: canvPsBmap.tcl,v 1.3 1999/04/16 01:51:35 stanton Exp $ 6 7catch {destroy .t} 8toplevel .t 9wm title .t "Postscript Tests for Canvases" 10wm iconname .t "Postscript" 11wm geom .t +0+0 12wm minsize .t 1 1 13 14set c .t.c 15 16message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets for bitmaps. Click on "Print" to print the canvas to your default printer. You can click on items in the canvas to delete them.} -width 6i 17pack .t.m -side top -fill both 18 19frame .t.bot 20pack .t.bot -side bottom -fill both 21button .t.bot.quit -text Quit -command {destroy .t} 22button .t.bot.print -text Print -command "lpr $c" 23pack .t.bot.print .t.bot.quit -side left -pady 1m -expand 1 24 25canvas $c -width 6i -height 6i -bd 2 -relief sunken 26pack $c -expand yes -fill both -padx 2m -pady 2m 27 28$c create bitmap 0.5i 0.5i \ 29 -bitmap @[file join $tk_library demos/images/flagdown.bmp] \ 30 -background {} -foreground black -anchor nw 31$c create rect 0.47i 0.47i 0.53i 0.53i -fill {} -outline black 32 33$c create bitmap 3.0i 0.5i \ 34 -bitmap @[file join $tk_library demos/images/flagdown.bmp] \ 35 -background {} -foreground black -anchor n 36$c create rect 2.97i 0.47i 3.03i 0.53i -fill {} -outline black 37 38$c create bitmap 5.5i 0.5i \ 39 -bitmap @[file join $tk_library demos/images/flagdown.bmp] \ 40 -background black -foreground white -anchor ne 41$c create rect 5.47i 0.47i 5.53i 0.53i -fill {} -outline black 42 43$c create bitmap 0.5i 3.0i \ 44 -bitmap @[file join $tk_library demos/images/face.bmp] \ 45 -background {} -foreground black -anchor w 46$c create rect 0.47i 2.97i 0.53i 3.03i -fill {} -outline black 47 48$c create bitmap 3.0i 3.0i \ 49 -bitmap @[file join $tk_library demos/images/face.bmp] \ 50 -background {} -foreground black -anchor center 51$c create rect 2.97i 2.97i 3.03i 3.03i -fill {} -outline black 52 53$c create bitmap 5.5i 3.0i \ 54 -bitmap @[file join $tk_library demos/images/face.bmp] \ 55 -background blue -foreground black -anchor e 56$c create rect 5.47i 2.97i 5.53i 3.03i -fill {} -outline black 57 58$c create bitmap 0.5i 5.5i \ 59 -bitmap @[file join $tk_library demos/images/flagup.bmp] \ 60 -background black -foreground white -anchor sw 61$c create rect 0.47i 5.47i 0.53i 5.53i -fill {} -outline black 62 63$c create bitmap 3.0i 5.5i \ 64 -bitmap @[file join $tk_library demos/images/flagup.bmp] \ 65 -background green -foreground white -anchor s 66$c create rect 2.97i 5.47i 3.03i 5.53i -fill {} -outline black 67 68$c create bitmap 5.5i 5.5i \ 69 -bitmap @[file join $tk_library demos/images/flagup.bmp] \ 70 -background {} -foreground black -anchor se 71$c create rect 5.47i 5.47i 5.53i 5.53i -fill {} -outline black 72 73 74 75 76 77 78 79 80 81 82 83 84 85