;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 6.5.1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(require picturing-programs)

; Worked exercise 6.5.1


; place-on-pink : image -> image
(check-expect (place-on-pink pic:calendar)
              (place-image pic:calendar
                           100 40
                           (rectangle 150 200 "solid" "pink")))
(check-expect (place-on-pink (triangle 30 "solid" "blue"))
              (place-image (triangle 30 "solid" "blue")
                           100 40
                           (rectangle 150 200 "solid" "pink")))
(define (place-on-pink picture)
  ; picture image
  (place-image picture
               100 40
               (rectangle 150 200 "solid" "pink"))
  )

(big-bang pic:calendar
          (on-tick rotate-cw 1/2)
          (on-draw place-on-pink))