Skip to content

Instantly share code, notes, and snippets.

@soegaard
Created September 20, 2013 18:06
Show Gist options
  • Select an option

  • Save soegaard/6641417 to your computer and use it in GitHub Desktop.

Select an option

Save soegaard/6641417 to your computer and use it in GitHub Desktop.
#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