waterbearlang / waterbear

Visual block syntax for programming languages
http://waterbearlang.com/
357 stars 88 forks source link

added clip block and a demo #1273

Closed dethe closed 8 years ago

dethe commented 8 years ago

Added a block for shapes that allows us to clip to an arbitrary path. Eventually I'd like to be able to do this for all drawing: shape, image, sprite, text. Added an example demonstrating it where three rotating triangles are clipped to one stationary triangle.

dethe commented 8 years ago

I found a bug: Once we set the clip it is never cleared and everything (even on subsequent runs) is clipped to that shape. [Fixed now]

dethe commented 8 years ago

Changed clip to be a context and reset the clip once you leave the context. Updated demo to show shapes that are and are not clipped.

alexjsmac commented 8 years ago

Cool example! Everything looks fine to me.