tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
14
Task/Pinstripe-Printer/Tcl/pinstripe-printer.tcl
Normal file
14
Task/Pinstripe-Printer/Tcl/pinstripe-printer.tcl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package require Tk
|
||||
# Allocate a temporary drawing surface
|
||||
canvas .c
|
||||
# Draw the output we want
|
||||
for {set y 0;set dx 1} {$y < 11*72} {incr y 72;incr dx} {
|
||||
for {set x 0;set c 0} {$x < 8.5*72} {incr x $dx;set c [expr {!$c}]} {
|
||||
.c create rectangle $x $y [expr {$x+$dx+1}] [expr {$y+73}] \
|
||||
-fill [lindex {black white} $c] -outline {}
|
||||
}
|
||||
}
|
||||
# Send postscript to default printer, scaled 1 pixel -> 1 point
|
||||
exec lp - << [.c postscript -height $y -width $x -pageheight $y -pagewidth $x]
|
||||
# Explicit exit; no GUI desired
|
||||
exit
|
||||
Loading…
Add table
Add a link
Reference in a new issue