Guest User

Untitled

a guest
May 20th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ; 6.
  2.  
  3. ;; place-Rectangle: Rectangle image -> image
  4. ;; Given a rectangle, produces it in an image.
  5. (define (place-Rectangle a-Rectangle img)
  6. (place-image/align (draw-Rectangle a-Rectangle)
  7. (posn-x (Rectangle-tl-corner a-Rectangle))
  8. (posn-y (Rectangle-tl-corner a-Rectangle))
  9. "left" "top"
  10. img))
  11.  
  12. (check-expect (place-Rectangle R1 (empty-scene 150 150))
  13. .)
  14. (check-expect (place-Rectangle R2 (square 100 "solid" "yellow"))
  15. .)
Add Comment
Please, Sign In to add comment