Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Pinstripe-Display/Racket/pinstripe-display.rkt
Normal file
27
Task/Pinstripe-Display/Racket/pinstripe-display.rkt
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#lang racket/gui
|
||||
|
||||
(define-values [W H] (get-display-size #t))
|
||||
|
||||
(define parts 4)
|
||||
|
||||
(define (paint-pinstripe canvas dc)
|
||||
(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*))))
|
||||
|
||||
(define full-frame%
|
||||
(class frame%
|
||||
(define/override (on-subwindow-char r e)
|
||||
(when (eq? 'escape (send e get-key-code))
|
||||
(send this show #f)))
|
||||
(super-new
|
||||
[label "Pinstripe"] [width W] [height H]
|
||||
[style '(no-caption no-resize-border hide-menu-bar no-system-menu)])
|
||||
(define c (new canvas% [parent this] [paint-callback paint-pinstripe]))
|
||||
(send this show #t)))
|
||||
|
||||
(void (new full-frame%))
|
||||
Loading…
Add table
Add a link
Reference in a new issue