dyoo / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
250 stars 30 forks source link

image library bug #66

Closed dyoo closed 11 years ago

dyoo commented 12 years ago

Mentioned by emmanuel:

To reproduce (add-line (rectangle 100 100 "solid" "red") 0 0 40 100 "black")

DrRacket correctly places the line on the lefthand side, WeScheme puts it in the middle. Guess why?

Location https://github.com/dyoo/whalesong/blob/master/image/private/js-impl.js, line 768

return makeOverlayImage(line, img, "middle", "middle");

Proposed Fix Instead of passing in "middle", we should be using the values of x1 and y1.

dyoo commented 11 years ago

Closing bug; the current version of Whalesong does the right thing here.