Add empty-image constant

This commit is contained in:
Vishesh Yadav 2015-06-08 15:20:57 -04:00
parent d6ab1366a0
commit 4474eda64f

View File

@ -1,13 +1,15 @@
#lang s-exp "../../lang/base.rkt" #lang s-exp "../../lang/base.rkt"
;; Image functions that be implemented using racket based on primitives ;; Image functions that be implemented using racket based on primitives
;; NOTE: Modifications here may require rebuilding of Whalesong
(require "main.rkt" (require "main.rkt"
"../../lang/for.rkt" "../../lang/for.rkt"
"../../lang/posn.rkt") "../../lang/posn.rkt")
(provide place-images (provide place-images
place-images/align) place-images/align
empty-image)
; place-images : (listof image?) (listof posn?) image? -> image? ; place-images : (listof image?) (listof posn?) image? -> image?
(define (place-images images posns scene) (define (place-images images posns scene)
@ -20,3 +22,5 @@
(for/fold ([acc scene]) (for/fold ([acc scene])
([img images] [posn posns]) ([img images] [posn posns])
(place-image/align img (posn-x posn) (posn-y posn) x-place y-place acc))) (place-image/align img (posn-x posn) (posn-y posn) x-place y-place acc)))
(define empty-image (rectangle 0 0 "solid" "black"))