Layer:setViewport

Edit

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

Layer:setViewport(x, y, w, h)

Arguments

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.

Returns

Nothing

See also