|
@@ -20,119 +20,123 @@ Base class of anything 2D.
|
|
|
Member Functions
|
|
|
----------------
|
|
|
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`_draw<class_CanvasItem__draw>` **(** **)** virtual |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`float<class_float>` | :ref:`draw_char<class_CanvasItem_draw_char>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` char, :ref:`String<class_string>` next, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_circle<class_CanvasItem_draw_circle>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_color>` color **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_colored_polygon<class_CanvasItem_draw_colored_polygon>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`Color<class_color>` color, :ref:`Vector2Array<class_vector2array>` uvs=Vector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_line<class_CanvasItem_draw_line>` **(** :ref:`Vector2<class_vector2>` from, :ref:`Vector2<class_vector2>` to, :ref:`Color<class_color>` color, :ref:`float<class_float>` width=1, :ref:`bool<class_bool>` antialiased=false **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_polygon<class_CanvasItem_draw_polygon>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Vector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_primitive<class_CanvasItem_draw_primitive>` **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs, :ref:`Texture<class_texture>` texture=NULL, :ref:`float<class_float>` width=1 **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_rect<class_CanvasItem_draw_rect>` **(** :ref:`Rect2<class_rect2>` rect, :ref:`Color<class_color>` color **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_set_transform<class_CanvasItem_draw_set_transform>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` rot, :ref:`Vector2<class_vector2>` scale **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_set_transform_matrix<class_CanvasItem_draw_set_transform_matrix>` **(** :ref:`Matrix32<class_matrix32>` xform **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_string<class_CanvasItem_draw_string>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` text, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_style_box<class_CanvasItem_draw_style_box>` **(** :ref:`StyleBox<class_stylebox>` style_box, :ref:`Rect2<class_rect2>` rect **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_texture<class_CanvasItem_draw_texture>` **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` pos, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_texture_rect<class_CanvasItem_draw_texture_rect>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`draw_texture_rect_region<class_CanvasItem_draw_texture_rect_region>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Rect2<class_rect2>` src_rect, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Variant<class_variant>` | :ref:`edit_get_state<class_CanvasItem_edit_get_state>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`edit_rotate<class_CanvasItem_edit_rotate>` **(** :ref:`float<class_float>` degrees **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`edit_set_rect<class_CanvasItem_edit_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`edit_set_state<class_CanvasItem_edit_set_state>` **(** :ref:`Variant<class_variant>` state **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`get_blend_mode<class_CanvasItem_get_blend_mode>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`RID<class_rid>` | :ref:`get_canvas<class_CanvasItem_get_canvas>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`RID<class_rid>` | :ref:`get_canvas_item<class_CanvasItem_get_canvas_item>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Matrix32<class_matrix32>` | :ref:`get_canvas_transform<class_CanvasItem_get_canvas_transform>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Vector2<class_vector2>` | :ref:`get_global_mouse_pos<class_CanvasItem_get_global_mouse_pos>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Matrix32<class_matrix32>` | :ref:`get_global_transform<class_CanvasItem_get_global_transform>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Matrix32<class_matrix32>` | :ref:`get_global_transform_with_canvas<class_CanvasItem_get_global_transform_with_canvas>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Rect2<class_rect2>` | :ref:`get_item_and_children_rect<class_CanvasItem_get_item_and_children_rect>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Rect2<class_rect2>` | :ref:`get_item_rect<class_CanvasItem_get_item_rect>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`get_light_mask<class_CanvasItem_get_light_mask>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Vector2<class_vector2>` | :ref:`get_local_mouse_pos<class_CanvasItem_get_local_mouse_pos>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`CanvasItemMaterial<class_canvasitemmaterial>` | :ref:`get_material<class_CanvasItem_get_material>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`float<class_float>` | :ref:`get_opacity<class_CanvasItem_get_opacity>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`float<class_float>` | :ref:`get_self_opacity<class_CanvasItem_get_self_opacity>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Matrix32<class_matrix32>` | :ref:`get_transform<class_CanvasItem_get_transform>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`get_use_parent_material<class_CanvasItem_get_use_parent_material>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Rect2<class_rect2>` | :ref:`get_viewport_rect<class_CanvasItem_get_viewport_rect>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Matrix32<class_matrix32>` | :ref:`get_viewport_transform<class_CanvasItem_get_viewport_transform>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Object<class_object>` | :ref:`get_world_2d<class_CanvasItem_get_world_2d>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`hide<class_CanvasItem_hide>` **(** **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_draw_behind_parent_enabled<class_CanvasItem_is_draw_behind_parent_enabled>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_hidden<class_CanvasItem_is_hidden>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_set_as_toplevel<class_CanvasItem_is_set_as_toplevel>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_visible<class_CanvasItem_is_visible>` **(** **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Vector2<class_vector2>` | :ref:`make_canvas_pos_local<class_CanvasItem_make_canvas_pos_local>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`InputEvent<class_inputevent>` | :ref:`make_input_local<class_CanvasItem_make_input_local>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_as_toplevel<class_CanvasItem_set_as_toplevel>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_blend_mode<class_CanvasItem_set_blend_mode>` **(** :ref:`int<class_int>` blend_mode **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_draw_behind_parent<class_CanvasItem_set_draw_behind_parent>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_hidden<class_CanvasItem_set_hidden>` **(** :ref:`bool<class_bool>` hidden **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_light_mask<class_CanvasItem_set_light_mask>` **(** :ref:`int<class_int>` light_mask **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_material<class_CanvasItem_set_material>` **(** :ref:`CanvasItemMaterial<class_canvasitemmaterial>` material **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_opacity<class_CanvasItem_set_opacity>` **(** :ref:`float<class_float>` opacity **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_self_opacity<class_CanvasItem_set_self_opacity>` **(** :ref:`float<class_float>` self_opacity **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_use_parent_material<class_CanvasItem_set_use_parent_material>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`show<class_CanvasItem_show>` **(** **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`update<class_CanvasItem_update>` **(** **)** |
|
|
|
-+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`_draw<class_CanvasItem__draw>` **(** **)** virtual |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`float<class_float>` | :ref:`draw_char<class_CanvasItem_draw_char>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` char, :ref:`String<class_string>` next, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_circle<class_CanvasItem_draw_circle>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_color>` color **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_colored_polygon<class_CanvasItem_draw_colored_polygon>` **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`Color<class_color>` color, :ref:`PoolVector2Array<class_poolvector2array>` uvs=PoolVector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_line<class_CanvasItem_draw_line>` **(** :ref:`Vector2<class_vector2>` from, :ref:`Vector2<class_vector2>` to, :ref:`Color<class_color>` color, :ref:`float<class_float>` width=1, :ref:`bool<class_bool>` antialiased=false **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_polygon<class_CanvasItem_draw_polygon>` **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`PoolColorArray<class_poolcolorarray>` colors, :ref:`PoolVector2Array<class_poolvector2array>` uvs=PoolVector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_primitive<class_CanvasItem_draw_primitive>` **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`PoolColorArray<class_poolcolorarray>` colors, :ref:`PoolVector2Array<class_poolvector2array>` uvs, :ref:`Texture<class_texture>` texture=NULL, :ref:`float<class_float>` width=1 **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_rect<class_CanvasItem_draw_rect>` **(** :ref:`Rect2<class_rect2>` rect, :ref:`Color<class_color>` color **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_set_transform<class_CanvasItem_draw_set_transform>` **(** :ref:`Vector2<class_vector2>` pos, :ref:`float<class_float>` rot, :ref:`Vector2<class_vector2>` scale **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_set_transform_matrix<class_CanvasItem_draw_set_transform_matrix>` **(** :ref:`Transform2D<class_transform2d>` xform **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_string<class_CanvasItem_draw_string>` **(** :ref:`Font<class_font>` font, :ref:`Vector2<class_vector2>` pos, :ref:`String<class_string>` text, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`int<class_int>` clip_w=-1 **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_style_box<class_CanvasItem_draw_style_box>` **(** :ref:`StyleBox<class_stylebox>` style_box, :ref:`Rect2<class_rect2>` rect **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_texture<class_CanvasItem_draw_texture>` **(** :ref:`Texture<class_texture>` texture, :ref:`Vector2<class_vector2>` pos, :ref:`Color<class_color>` modulate=Color(1,1,1,1) **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_texture_rect<class_CanvasItem_draw_texture_rect>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`draw_texture_rect_region<class_CanvasItem_draw_texture_rect_region>` **(** :ref:`Texture<class_texture>` texture, :ref:`Rect2<class_rect2>` rect, :ref:`Rect2<class_rect2>` src_rect, :ref:`Color<class_color>` modulate=Color(1,1,1,1), :ref:`bool<class_bool>` transpose=false **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_variant>` | :ref:`edit_get_state<class_CanvasItem_edit_get_state>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`edit_rotate<class_CanvasItem_edit_rotate>` **(** :ref:`float<class_float>` degrees **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`edit_set_rect<class_CanvasItem_edit_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`edit_set_state<class_CanvasItem_edit_set_state>` **(** :ref:`Variant<class_variant>` state **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`RID<class_rid>` | :ref:`get_canvas<class_CanvasItem_get_canvas>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`RID<class_rid>` | :ref:`get_canvas_item<class_CanvasItem_get_canvas_item>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Transform2D<class_transform2d>` | :ref:`get_canvas_transform<class_CanvasItem_get_canvas_transform>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Vector2<class_vector2>` | :ref:`get_global_mouse_pos<class_CanvasItem_get_global_mouse_pos>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Transform2D<class_transform2d>` | :ref:`get_global_transform<class_CanvasItem_get_global_transform>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Transform2D<class_transform2d>` | :ref:`get_global_transform_with_canvas<class_CanvasItem_get_global_transform_with_canvas>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Rect2<class_rect2>` | :ref:`get_item_and_children_rect<class_CanvasItem_get_item_and_children_rect>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Rect2<class_rect2>` | :ref:`get_item_rect<class_CanvasItem_get_item_rect>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`get_light_mask<class_CanvasItem_get_light_mask>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Vector2<class_vector2>` | :ref:`get_local_mouse_pos<class_CanvasItem_get_local_mouse_pos>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`ShaderMaterial<class_shadermaterial>` | :ref:`get_material<class_CanvasItem_get_material>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Color<class_color>` | :ref:`get_modulate<class_CanvasItem_get_modulate>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Color<class_color>` | :ref:`get_self_modulate<class_CanvasItem_get_self_modulate>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Transform2D<class_transform2d>` | :ref:`get_transform<class_CanvasItem_get_transform>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`get_use_parent_material<class_CanvasItem_get_use_parent_material>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Rect2<class_rect2>` | :ref:`get_viewport_rect<class_CanvasItem_get_viewport_rect>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Transform2D<class_transform2d>` | :ref:`get_viewport_transform<class_CanvasItem_get_viewport_transform>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Object<class_object>` | :ref:`get_world_2d<class_CanvasItem_get_world_2d>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`hide<class_CanvasItem_hide>` **(** **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_draw_behind_parent_enabled<class_CanvasItem_is_draw_behind_parent_enabled>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_CanvasItem_is_local_transform_notification_enabled>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_set_as_toplevel<class_CanvasItem_is_set_as_toplevel>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_CanvasItem_is_transform_notification_enabled>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_visible<class_CanvasItem_is_visible>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_CanvasItem_is_visible_in_tree>` **(** **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Vector2<class_vector2>` | :ref:`make_canvas_pos_local<class_CanvasItem_make_canvas_pos_local>` **(** :ref:`Vector2<class_vector2>` screen_point **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`InputEvent<class_inputevent>` | :ref:`make_input_local<class_CanvasItem_make_input_local>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_as_toplevel<class_CanvasItem_set_as_toplevel>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_draw_behind_parent<class_CanvasItem_set_draw_behind_parent>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_light_mask<class_CanvasItem_set_light_mask>` **(** :ref:`int<class_int>` light_mask **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_material<class_CanvasItem_set_material>` **(** :ref:`ShaderMaterial<class_shadermaterial>` material **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_modulate<class_CanvasItem_set_modulate>` **(** :ref:`Color<class_color>` modulate **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_notify_local_transform<class_CanvasItem_set_notify_local_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_notify_transform<class_CanvasItem_set_notify_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_self_modulate<class_CanvasItem_set_self_modulate>` **(** :ref:`Color<class_color>` self_modulate **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_use_parent_material<class_CanvasItem_set_use_parent_material>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_visible<class_CanvasItem_set_visible>` **(** :ref:`bool<class_bool>` arg0 **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`show<class_CanvasItem_show>` **(** **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`update<class_CanvasItem_update>` **(** **)** |
|
|
|
++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
Signals
|
|
|
-------
|
|
@@ -142,6 +146,18 @@ Signals
|
|
|
- **item_rect_changed** **(** **)**
|
|
|
- **visibility_changed** **(** **)**
|
|
|
|
|
|
+Member Variables
|
|
|
+----------------
|
|
|
+
|
|
|
+- :ref:`int<class_int>` **light_mask**
|
|
|
+- :ref:`ShaderMaterial<class_shadermaterial>` **material**
|
|
|
+- :ref:`Color<class_color>` **modulate**
|
|
|
+- :ref:`Color<class_color>` **self_modulate**
|
|
|
+- :ref:`bool<class_bool>` **show_behind_parent**
|
|
|
+- :ref:`bool<class_bool>` **show_on_top**
|
|
|
+- :ref:`bool<class_bool>` **use_parent_material**
|
|
|
+- :ref:`bool<class_bool>` **visible**
|
|
|
+
|
|
|
Numeric Constants
|
|
|
-----------------
|
|
|
|
|
@@ -192,7 +208,7 @@ Draw a colored circle.
|
|
|
|
|
|
.. _class_CanvasItem_draw_colored_polygon:
|
|
|
|
|
|
-- void **draw_colored_polygon** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`Color<class_color>` color, :ref:`Vector2Array<class_vector2array>` uvs=Vector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)**
|
|
|
+- void **draw_colored_polygon** **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`Color<class_color>` color, :ref:`PoolVector2Array<class_poolvector2array>` uvs=PoolVector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)**
|
|
|
|
|
|
Draw a colored polygon of any amount of points, convex or concave.
|
|
|
|
|
@@ -204,13 +220,13 @@ Draw a line from a 2D point to another, with a given color and width. It can be
|
|
|
|
|
|
.. _class_CanvasItem_draw_polygon:
|
|
|
|
|
|
-- void **draw_polygon** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs=Vector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)**
|
|
|
+- void **draw_polygon** **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`PoolColorArray<class_poolcolorarray>` colors, :ref:`PoolVector2Array<class_poolvector2array>` uvs=PoolVector2Array([]), :ref:`Texture<class_texture>` texture=NULL **)**
|
|
|
|
|
|
Draw a polygon of any amount of points, convex or concave.
|
|
|
|
|
|
.. _class_CanvasItem_draw_primitive:
|
|
|
|
|
|
-- void **draw_primitive** **(** :ref:`Vector2Array<class_vector2array>` points, :ref:`ColorArray<class_colorarray>` colors, :ref:`Vector2Array<class_vector2array>` uvs, :ref:`Texture<class_texture>` texture=NULL, :ref:`float<class_float>` width=1 **)**
|
|
|
+- void **draw_primitive** **(** :ref:`PoolVector2Array<class_poolvector2array>` points, :ref:`PoolColorArray<class_poolcolorarray>` colors, :ref:`PoolVector2Array<class_poolvector2array>` uvs, :ref:`Texture<class_texture>` texture=NULL, :ref:`float<class_float>` width=1 **)**
|
|
|
|
|
|
Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
|
|
|
|
|
@@ -228,7 +244,7 @@ Set a custom transform for drawing. Anything drawn afterwards will be transforme
|
|
|
|
|
|
.. _class_CanvasItem_draw_set_transform_matrix:
|
|
|
|
|
|
-- void **draw_set_transform_matrix** **(** :ref:`Matrix32<class_matrix32>` xform **)**
|
|
|
+- void **draw_set_transform_matrix** **(** :ref:`Transform2D<class_transform2d>` xform **)**
|
|
|
|
|
|
.. _class_CanvasItem_draw_string:
|
|
|
|
|
@@ -282,12 +298,6 @@ Used for editing, handle rotation.
|
|
|
|
|
|
Set the transform state of this CanvasItem. For :ref:`Node2D<class_node2d>`, this is an :ref:`Array<class_array>` with (in order) a :ref:`Vector2<class_vector2>` for position, a float for rotation and another :ref:`Vector2<class_vector2>` for scale. For :ref:`Control<class_control>` this is a :ref:`Rect2<class_rect2>` with the position and size.
|
|
|
|
|
|
-.. _class_CanvasItem_get_blend_mode:
|
|
|
-
|
|
|
-- :ref:`int<class_int>` **get_blend_mode** **(** **)** const
|
|
|
-
|
|
|
-Return the current blending mode from enum BLEND_MODE\_\*.
|
|
|
-
|
|
|
.. _class_CanvasItem_get_canvas:
|
|
|
|
|
|
- :ref:`RID<class_rid>` **get_canvas** **(** **)** const
|
|
@@ -302,7 +312,7 @@ Return the canvas item RID used by :ref:`VisualServer<class_visualserver>` for t
|
|
|
|
|
|
.. _class_CanvasItem_get_canvas_transform:
|
|
|
|
|
|
-- :ref:`Matrix32<class_matrix32>` **get_canvas_transform** **(** **)** const
|
|
|
+- :ref:`Transform2D<class_transform2d>` **get_canvas_transform** **(** **)** const
|
|
|
|
|
|
Get the transform matrix of this item's canvas.
|
|
|
|
|
@@ -314,13 +324,13 @@ Get the global position of the mouse.
|
|
|
|
|
|
.. _class_CanvasItem_get_global_transform:
|
|
|
|
|
|
-- :ref:`Matrix32<class_matrix32>` **get_global_transform** **(** **)** const
|
|
|
+- :ref:`Transform2D<class_transform2d>` **get_global_transform** **(** **)** const
|
|
|
|
|
|
Get the global transform matrix of this item.
|
|
|
|
|
|
.. _class_CanvasItem_get_global_transform_with_canvas:
|
|
|
|
|
|
-- :ref:`Matrix32<class_matrix32>` **get_global_transform_with_canvas** **(** **)** const
|
|
|
+- :ref:`Transform2D<class_transform2d>` **get_global_transform_with_canvas** **(** **)** const
|
|
|
|
|
|
Get the global transform matrix of this item in relation to the canvas.
|
|
|
|
|
@@ -350,25 +360,25 @@ Get the mouse position relative to this item's position.
|
|
|
|
|
|
.. _class_CanvasItem_get_material:
|
|
|
|
|
|
-- :ref:`CanvasItemMaterial<class_canvasitemmaterial>` **get_material** **(** **)** const
|
|
|
+- :ref:`ShaderMaterial<class_shadermaterial>` **get_material** **(** **)** const
|
|
|
|
|
|
Get the material of this item.
|
|
|
|
|
|
-.. _class_CanvasItem_get_opacity:
|
|
|
+.. _class_CanvasItem_get_modulate:
|
|
|
|
|
|
-- :ref:`float<class_float>` **get_opacity** **(** **)** const
|
|
|
+- :ref:`Color<class_color>` **get_modulate** **(** **)** const
|
|
|
|
|
|
-Return the canvas item opacity. This affects the canvas item and all the children.
|
|
|
+Get the modulate of the CanvasItem, which affects children items too.
|
|
|
|
|
|
-.. _class_CanvasItem_get_self_opacity:
|
|
|
+.. _class_CanvasItem_get_self_modulate:
|
|
|
|
|
|
-- :ref:`float<class_float>` **get_self_opacity** **(** **)** const
|
|
|
+- :ref:`Color<class_color>` **get_self_modulate** **(** **)** const
|
|
|
|
|
|
-Return the canvas item self-opacity.
|
|
|
+Get the self-modulate of the CanvasItem.
|
|
|
|
|
|
.. _class_CanvasItem_get_transform:
|
|
|
|
|
|
-- :ref:`Matrix32<class_matrix32>` **get_transform** **(** **)** const
|
|
|
+- :ref:`Transform2D<class_transform2d>` **get_transform** **(** **)** const
|
|
|
|
|
|
Get the transform matrix of this item.
|
|
|
|
|
@@ -386,7 +396,7 @@ Get the viewport's boundaries as a :ref:`Rect2<class_rect2>`.
|
|
|
|
|
|
.. _class_CanvasItem_get_viewport_transform:
|
|
|
|
|
|
-- :ref:`Matrix32<class_matrix32>` **get_viewport_transform** **(** **)** const
|
|
|
+- :ref:`Transform2D<class_transform2d>` **get_viewport_transform** **(** **)** const
|
|
|
|
|
|
Get this item's transform in relation to the viewport.
|
|
|
|
|
@@ -408,11 +418,9 @@ Hide the CanvasItem currently visible.
|
|
|
|
|
|
Return whether the item is drawn behind its parent.
|
|
|
|
|
|
-.. _class_CanvasItem_is_hidden:
|
|
|
-
|
|
|
-- :ref:`bool<class_bool>` **is_hidden** **(** **)** const
|
|
|
+.. _class_CanvasItem_is_local_transform_notification_enabled:
|
|
|
|
|
|
-Return true if this CanvasItem is hidden. Note that the CanvasItem may not be visible, but as long as it's not hidden (:ref:`hide<class_CanvasItem_hide>` called) the function will return false.
|
|
|
+- :ref:`bool<class_bool>` **is_local_transform_notification_enabled** **(** **)** const
|
|
|
|
|
|
.. _class_CanvasItem_is_set_as_toplevel:
|
|
|
|
|
@@ -420,12 +428,20 @@ Return true if this CanvasItem is hidden. Note that the CanvasItem may not be vi
|
|
|
|
|
|
Return if set as toplevel. See :ref:`set_as_toplevel<class_CanvasItem_set_as_toplevel>`.
|
|
|
|
|
|
+.. _class_CanvasItem_is_transform_notification_enabled:
|
|
|
+
|
|
|
+- :ref:`bool<class_bool>` **is_transform_notification_enabled** **(** **)** const
|
|
|
+
|
|
|
.. _class_CanvasItem_is_visible:
|
|
|
|
|
|
- :ref:`bool<class_bool>` **is_visible** **(** **)** const
|
|
|
|
|
|
Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
|
|
|
|
|
|
+.. _class_CanvasItem_is_visible_in_tree:
|
|
|
+
|
|
|
+- :ref:`bool<class_bool>` **is_visible_in_tree** **(** **)** const
|
|
|
+
|
|
|
.. _class_CanvasItem_make_canvas_pos_local:
|
|
|
|
|
|
- :ref:`Vector2<class_vector2>` **make_canvas_pos_local** **(** :ref:`Vector2<class_vector2>` screen_point **)** const
|
|
@@ -442,24 +458,12 @@ Takes a global input event and convert to this item's coordinate system.
|
|
|
|
|
|
Set as top level. This means that it will not inherit transform from parent canvas items.
|
|
|
|
|
|
-.. _class_CanvasItem_set_blend_mode:
|
|
|
-
|
|
|
-- void **set_blend_mode** **(** :ref:`int<class_int>` blend_mode **)**
|
|
|
-
|
|
|
-Set the blending mode from enum BLEND_MODE\_\*.
|
|
|
-
|
|
|
.. _class_CanvasItem_set_draw_behind_parent:
|
|
|
|
|
|
- void **set_draw_behind_parent** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
|
|
Set whether the canvas item is drawn behind its parent.
|
|
|
|
|
|
-.. _class_CanvasItem_set_hidden:
|
|
|
-
|
|
|
-- void **set_hidden** **(** :ref:`bool<class_bool>` hidden **)**
|
|
|
-
|
|
|
-Set whether this item should be hidden or not. Note that no matter what is set here this item won't be shown if its parent or grandparents nodes are also hidden. A hidden CanvasItem make all children hidden too.
|
|
|
-
|
|
|
.. _class_CanvasItem_set_light_mask:
|
|
|
|
|
|
- void **set_light_mask** **(** :ref:`int<class_int>` light_mask **)**
|
|
@@ -468,21 +472,29 @@ Set the ligtht mask number of this item.
|
|
|
|
|
|
.. _class_CanvasItem_set_material:
|
|
|
|
|
|
-- void **set_material** **(** :ref:`CanvasItemMaterial<class_canvasitemmaterial>` material **)**
|
|
|
+- void **set_material** **(** :ref:`ShaderMaterial<class_shadermaterial>` material **)**
|
|
|
|
|
|
Set the material of this item.
|
|
|
|
|
|
-.. _class_CanvasItem_set_opacity:
|
|
|
+.. _class_CanvasItem_set_modulate:
|
|
|
+
|
|
|
+- void **set_modulate** **(** :ref:`Color<class_color>` modulate **)**
|
|
|
+
|
|
|
+Set the modulate of the CanvasItem. This *affects* the modulation of children items.
|
|
|
|
|
|
-- void **set_opacity** **(** :ref:`float<class_float>` opacity **)**
|
|
|
+.. _class_CanvasItem_set_notify_local_transform:
|
|
|
|
|
|
-Set canvas item opacity. This will affect the canvas item and all the children.
|
|
|
+- void **set_notify_local_transform** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
|
|
-.. _class_CanvasItem_set_self_opacity:
|
|
|
+.. _class_CanvasItem_set_notify_transform:
|
|
|
|
|
|
-- void **set_self_opacity** **(** :ref:`float<class_float>` self_opacity **)**
|
|
|
+- void **set_notify_transform** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
|
|
-Set canvas item self-opacity. This does not affect the opacity of children items.
|
|
|
+.. _class_CanvasItem_set_self_modulate:
|
|
|
+
|
|
|
+- void **set_self_modulate** **(** :ref:`Color<class_color>` self_modulate **)**
|
|
|
+
|
|
|
+Set the self-modulate of the CanvasItem. This does not affect the modulation of children items.
|
|
|
|
|
|
.. _class_CanvasItem_set_use_parent_material:
|
|
|
|
|
@@ -490,6 +502,14 @@ Set canvas item self-opacity. This does not affect the opacity of children items
|
|
|
|
|
|
Set whether or not this item should use its parent's material.
|
|
|
|
|
|
+.. _class_CanvasItem_set_visible:
|
|
|
+
|
|
|
+- void **set_visible** **(** :ref:`bool<class_bool>` arg0 **)**
|
|
|
+
|
|
|
+Set whether this item should be visible or not.
|
|
|
+
|
|
|
+Note that a hidden CanvasItem will make all children hidden too, so no matter what is set here this item won't be shown if its parent or grandparents nodes are hidden.
|
|
|
+
|
|
|
.. _class_CanvasItem_show:
|
|
|
|
|
|
- void **show** **(** **)**
|