Bounds.corners
Jump to navigation
Jump to search
Bounds.corners
returns the four corners of the bounds as a list of [x, y]
pairs.
Usage Notes
The result of this call may be passed directly to PixelDisplay.drawPoly or PixelDisplay.fillPoly, assuming the bounds is in the same coordinate system as that display.
Example
b = new Bounds
b.x = 480
b.y = 320
b.width = 200
b.height = 100
b.rotation = 90
print b.corners
The above prints [[530, 220], [430, 220], [430, 420], [530, 420]]
, representing the four corners of the rotated bounds.