.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.UI Canvas ====== .. type:: public class Canvas A canvas for user interface elements. See :meth:`getStockCanvas()` and :meth:`addCanvas()`. .. method:: RectTransform getRectTransform() The rect transform for the canvas. .. method:: boolean getVisible() .. method:: void setVisible(boolean value) Whether the UI object is visible. .. method:: Panel addPanel(boolean visible) Create a new container for user interface elements. :param boolean visible: Whether the panel is visible. .. method:: Text addText(String content, boolean visible) Add text to the canvas. :param String content: The text. :param boolean visible: Whether the text is visible. .. method:: InputField addInputField(boolean visible) Add an input field to the canvas. :param boolean visible: Whether the input field is visible. .. method:: Button addButton(String content, boolean visible) Add a button to the canvas. :param String content: The label for the button. :param boolean visible: Whether the button is visible. .. method:: void remove() Remove the UI object.