Created
September 20, 2013 18:06
-
-
Save soegaard/6641417 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require racket/draw) | |
| (define bm (make-object bitmap% 400 400)) | |
| (define dc (new bitmap-dc% [bitmap bm])) | |
| (define p (new dc-path%)) | |
| (send p move-to 300 200) | |
| (send p arc 100 100 200 200 0 (* 2 pi)) | |
| (send p line-to 400 200) | |
| (send p arc 0 0 400 400 0 (* 2 pi)) | |
| (send p close) | |
| (define blue (send the-color-database find-color "blue")) | |
| (define blue-brush (send the-brush-list find-or-create-brush blue 'solid)) | |
| (define blue-pen (send the-pen-list find-or-create-pen blue 0 'solid)) | |
| (send dc set-brush blue-brush) | |
| (send dc set-pen blue-pen) | |
| (send dc draw-path p) | |
| bm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment