shoes-deprecated
shoes-deprecated copied to clipboard
Circles are created with diameter instead of radius
The manual says that when you create a circle like this:
oval(100, 100, 200)
you should get a circle with top left (100, 100), and a radius of 200. You actually get a circle with diameter 200. Here's a demo app:
https://gist.github.com/2341166
Red Shoes:
Purple Shoes:
I'm not sure but it can be because of this line https://github.com/shoes/shoes/blob/develop/lib/shoes/chipmunk.rb#L18 I'll try to fix it tonight.
Yeah, this is a bad spec, may be a bug of Red Shoes, IMHO. So, I decided to change the behavior in Green and Purple Shoes.
@nashby It's not because of chipmunk.rb. Look at this: https://github.com/shoes/shoes/blob/develop/shoes/canvas.c#L508 In Red Shoes, radius seems to be set to width.
@ashbb I agree, this is a bug in red shoes. Green and Purple are correct. To not break current apps, it might be better to leave this behavior as is in Red for now, and fix it in a future release. But the manual is confusing.