Camera:center()method

widget only

This method is only available when the ui module is loaded before capture and Camera is used as a widget. Accessing it in object mode will raise an error.
Centers the Camera widget on its parent widget.

Return value

This method returns no value.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera:center() sample", "fixed", 640, 520) local cam = ui.Camera(win, 0, 0, 320, 240) cam:center() await win:showasync()