Sprites already have the concept of "local" and "world" coordinates, embodied in their localBounds and worldBounds properties.
But sometimes (as in #10), it's handy to convert between these coordinate systems. It might be nice to have localToWorld and worldToLocal methods that do this, taking into account scaling, rotation, and position in the same way that worldBounds does.
This would make it easier to figure out the sprite image pixel under a screen point, though that still will require a bit of math since images are centered on local 0,0.
Sprites already have the concept of "local" and "world" coordinates, embodied in their
localBounds
andworldBounds
properties.But sometimes (as in #10), it's handy to convert between these coordinate systems. It might be nice to have
localToWorld
andworldToLocal
methods that do this, taking into account scaling, rotation, and position in the same way thatworldBounds
does.This would make it easier to figure out the sprite image pixel under a screen point, though that still will require a bit of math since images are centered on local 0,0.