I re-wrote my SHPolygon class and added texture support via SHPolygonImage.
// Highly based on the following Sparrow extensions created by Daniel Sperl @ Gamua:
// Polygon: https://gist.github.com/PrimaryFeather/5352978
// TexturedPolygon: https://gist.github.com/PrimaryFeather/5679832
//
// Hit test code based on the following Starling extension, created by RomainThery:
// Polygon.as: https://gist.github.com/RomainThery/5366504/
The only advantage of these classes compared to Daniel's sample classes is:
- Setting color and alpha of each vertex.
- Accurate hit testing.
- Class structure (SPPolygonImage->SPPolygon) follows Sparrow's (SPImage->SPQuad).
- Limited texture masking effect. (See demo project/video)
http://wiki.sparrow-framework.org/users/shilo/extensions/shpolygon2
Edit: I just realized I have been posting my topics in "troubleshooting" category again. I do cause trouble, but don't shoot me for it! 😎