Hi, can anyone explain to me how the sizing/scaling works with canvas snapshot?
I have a sprite in the middle of the screen with its origin at top left, I action the canvas snapshot with the following:
Snapshot X : sprite.x
Snapshot Y : sprite.y
Snapshot Width : sprite.width
Snapshot Height: sprite.height
The outcome is not what I expect, and to be honest I cannot fathom out how to get it to just be that sprite?
If I leave all snapshot settings to 0, it does do a snapshot of the full viewport, as expected?
So what do I need to do to get just the sprite?
From what I can see , i need to be setting the X,Y,Width & height in Device Pixels, but how do I convert "pixels" to "Device Pixels"?