Layer:getViewport

Edit

Returns the viewport of the layer. The viewport is a 2D region of pixels that the layer will display within its plane.

x, y, w, h = Layer:getViewport()

Arguments

None

Returns

NameTypeDescription
xnumber The x coordinate of the upper-left corner of the viewport.
ynumber The y coordinate of the upper-left corner of the viewport.
wnumber The width of the viewport, in pixels.
hnumber The height of the viewport, in pixels.

See also