Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Pinstripe-Printer/Racket/pinstripe-printer.rkt
Normal file
17
Task/Pinstripe-Printer/Racket/pinstripe-printer.rkt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#lang racket/gui
|
||||
|
||||
(define parts 4)
|
||||
|
||||
(define dc (new printer-dc%))
|
||||
(send* dc (start-doc "Pinstripe") (start-page))
|
||||
|
||||
(define-values [W H] (send dc get-size))
|
||||
(send dc set-pen "black" 0 'solid)
|
||||
(send dc set-brush "black" 'solid)
|
||||
(define H* (round (/ H parts)))
|
||||
(for ([row parts])
|
||||
(define Y (* row H*))
|
||||
(for ([X (in-range 0 W (* (add1 row) 2))])
|
||||
(send dc draw-rectangle X Y (add1 row) H*)))
|
||||
|
||||
(send* dc (end-page) (end-doc))
|
||||
Loading…
Add table
Add a link
Reference in a new issue