PasteRack.org
Paste # 74393
2017-10-13 15:47:21

Forked from paste # 78767.

Fork as a new paste.

Paste viewed 104 times.


Embed:

  1. #lang racket
  2. (require pict racket/draw)
  3. (dc (lambda (dc dx dy)
  4.       (define eye-path (new dc-path%))
  5.       (send eye-path arc dx dy 50 100 0 pi)
  6.       (send eye-path arc dx dy 50 50 pi 0 #f)
  7.       (send eye-path close)
  8.       (send dc draw-path dx dy 50 100))
  9.      50 100)

=>

draw-path: contract violation

  expected: (is-a?/c dc-path%)

  given: 0

  in: the 1st argument of

      (->*m

       ((is-a?/c dc-path%))

       (real? real? (or/c 'odd-even 'winding))

       void?)

  contract from: (class bitmap-dc%)

  blaming: <pkgs>/pict-lib/pict/main.rkt

   (assuming the contract is correct)