Shape:computeAABB

Available since LÖVE 0.8.0
This function is not supported in earlier versions.

Returns the points of the bounding box for the transformed shape.

Function

Synopsis

topLeftX, topLeftY, bottomRightX, bottomRightY = Shape:computeAABB( tx, ty, tr, childIndex )

Arguments

number tx
The translation of the shape on the x-axis.
number ty
The translation of the shape on the y-axis.
number tr
The shape rotation.
number childIndex (1)
The index of the child to compute the bounding box of.

Returns

number topLeftX
The x position of the top-left point.
number topLeftY
The y position of the top-left point.
number bottomRightX
The x position of the bottom-right point.
number bottomRightY
The y position of the bottom-right point.

See Also


Other Languages