PasteRack.org
Paste # 8114
2014-03-27 13:46:21

Fork as a new paste.

Paste viewed 450 times.


Embed:

  1. #lang racket
  2. (require pict)
  3. (dc (λ (dc dx dy)
  4.         (define old-brush (send dc get-brush))
  5.         (define old-pen (send dc get-pen))
  6.         (send dc set-brush
  7.           (new brush% [style 'fdiagonal-hatch]
  8.                       [color "darkslategray"]))
  9.         (send dc set-pen
  10.           (new pen% [width 3] [color "slategray"]))
  11.         (define path (new dc-path%))
  12.         (send path move-to 0 0)
  13.         (send path line-to 50 0)
  14.         (send path line-to 25 50)
  15.         (send path close)
  16.         (send dc draw-path path dx dy)
  17.         (send dc set-brush old-brush)
  18.         (send dc set-pen old-pen))
  19.     50 50)

=>