shoes/brown_shoes — pull request #9 by wasnotrice (2012-04-23 07:25:56+00:00)
Title: Added App#shape, with move_to and line_to

To draw asteroids!

This is Shoes, WhiteShoes, and SwtShoes

This last commit is huge in terms of lines changed, but basically just

- added App#shape, with working move_to and line_to
- refactored Line and Oval out of Shape an into their own classes. This feels better, design-wise.
- moved lots of specs around, to follow the code

In the Swt implementation, Line and Oval create their own callbacks for painting. Shape is a composite of Lines (and will be able to contain other shapes in the future). It uses the Line objects for calculating dimensions (this happens at Shoes-, not Swt-level), but manages its own painting. This way, when Fill is implemented, the Shape will be able to fill itself. This is also consistent with Red Shoes, which allows you to specify the stroke and fill within the shape, and then uses the same stroke and fill for the whole shape.