Closed dyoo closed 12 years ago
Reported by Blake Johnson:
The following code produces an image that doesn't line up right in WeScheme but it does in DrRacket:
(define HEIGHT 200) (define WIDTH (* 1.9 HEIGHT)) (define STRIPE-HEIGHT (/ HEIGHT 13)) (define UNION-HEIGHT (* 7 STRIPE-HEIGHT)) (define UNION-WIDTH (* 2/5 WIDTH)) (define STAR-VERTICAL-SPACING (/ UNION-HEIGHT 10)) (define STAR-HORIZONTAL-SPACING (/ UNION-WIDTH 12)) (define STAR-DIAMETER (* 0.0616 HEIGHT))
(define (stripe color) (rectangle WIDTH STRIPE-HEIGHT "solid" color))
(define (stripe/pos i) (if (even? i) (stripe "red") (stripe "white")))
(define stripes (apply above (build-list 13 stripe/pos)))
(define union (rectangle UNION-WIDTH UNION-HEIGHT "solid" "blue"))
(define flag (overlay/xy union 0 0 stripes))
flag
Particularly (image-height stripes) returns 195.43622295673077 when it should be 200.
Should be mostly fixed in our development version, though WeScheme still reports the wrong image-height (195, rather than 200).
Reported by Blake Johnson:
The following code produces an image that doesn't line up right in WeScheme but it does in DrRacket:
(define HEIGHT 200) (define WIDTH (* 1.9 HEIGHT)) (define STRIPE-HEIGHT (/ HEIGHT 13)) (define UNION-HEIGHT (* 7 STRIPE-HEIGHT)) (define UNION-WIDTH (* 2/5 WIDTH)) (define STAR-VERTICAL-SPACING (/ UNION-HEIGHT 10)) (define STAR-HORIZONTAL-SPACING (/ UNION-WIDTH 12)) (define STAR-DIAMETER (* 0.0616 HEIGHT))
(define (stripe color) (rectangle WIDTH STRIPE-HEIGHT "solid" color))
(define (stripe/pos i) (if (even? i) (stripe "red") (stripe "white")))
(define stripes (apply above (build-list 13 stripe/pos)))
(define union (rectangle UNION-WIDTH UNION-HEIGHT "solid" "blue"))
(define flag (overlay/xy union 0 0 stripes))
flag
Particularly (image-height stripes) returns 195.43622295673077 when it should be 200.