;; 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")((modnamecounter-change-img) (read-case-sensitive#t) (teachpacks ()) (htdp-settings#(#tconstructorrepeating-decimal#f#tnone#f ())))
(require2htdp/image)
;; from Bloch, Picturing Programs
; counter-change : image image -> image
; Produces a square arrangement with the top-left image also
; in the bottom right, and the top-right image also in the
; bottom left.
(defineman (bitmap/url"http://picturingprograms.com/pictures/stick-figure.png"))
(definecalendar (bitmap/url"http://picturingprograms.com/pictures/calendar.png"))
(check-expect (counter-changemancalendar)
(above (besidemancalendar)
(besidecalendarman)))
(define (counter-changetop-lefttop-right)
(above (besidetop-lefttop-right)
(besidetop-righttop-left)))
(require (planetnah22/racketui))
(web-launch"Criss-Cross"
(function"Produces a criss-crossed arrangement of two pictures you select."
(counter-change ["Top left picture"image]
["Top right picture"image]
-> ["Criss-crossed combination"image])))