StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
285 stars 88 forks source link

Adding GraphicsPath and precisionHitTests #69

Closed IonSwitz closed 10 years ago

IonSwitz commented 10 years ago

This batch contains two new feature sets:

1 - Basic support for GraphicPaths, drawGraphicsData and drawPath in Graphics class.

2 - Geometry based Hit Tests on Strokes and Fills. This allows for proper picking of lines, splines, etc. Setting precisionHitTest = true on a Graphic object enables this. Setting a precisionHitTestDistance = adds that value to the hit test, to make it a lot easier to touch 1px thick lines on mobile devices, etc.