summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/base/classes.xml15
-rw-r--r--doc/engine_classes.xml4
-rw-r--r--scene/2d/canvas_item.cpp4
3 files changed, 17 insertions, 6 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 215f21b94b..03bccbea10 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -5792,25 +5792,28 @@
<argument index="0" name="self_opacity" type="float">
</argument>
<description>
+ Set canvas item self-opacity. This does not affect the opacity of children items.
</description>
</method>
<method name="get_self_opacity" qualifiers="const" >
<return type="float">
</return>
<description>
- Set canvas item self-opacity. This does not affect the opacity of children items.
+ Return the canvas item self-opacity.
</description>
</method>
<method name="set_draw_behind_parent" >
<argument index="0" name="enabe" type="bool">
</argument>
<description>
+ Sets whether the canvas item is drawn behind its parent.
</description>
</method>
<method name="is_draw_behind_parent_enabled" qualifiers="const" >
<return type="bool">
</return>
<description>
+ Return whether the item is drawn behind its parent.
</description>
</method>
<method name="draw_line" >
@@ -5864,8 +5867,10 @@
</argument>
<argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
<description>
- Draw a textured rectangle at a given position, optionally modulated by a color.
+ Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
</description>
</method>
<method name="draw_texture_rect_region" >
@@ -5877,8 +5882,10 @@
</argument>
<argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
<description>
- Draw a textured rectangle region at a given position, optionally modulated by a color.
+ Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
</description>
</method>
<method name="draw_style_box" >
@@ -6029,7 +6036,7 @@
</signal>
<signal name="hide">
<description>
- Emitten when becoming hidden.
+ Emitted when becoming hidden.
</description>
</signal>
</signals>
diff --git a/doc/engine_classes.xml b/doc/engine_classes.xml
index fca2be0318..acbb9d47fe 100644
--- a/doc/engine_classes.xml
+++ b/doc/engine_classes.xml
@@ -2499,6 +2499,8 @@
</argument>
<argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
@@ -2511,6 +2513,8 @@
</argument>
<argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 789c6bdbe4..92d5088b81 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -1071,8 +1071,8 @@ void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("draw_rect","rect","color"),&CanvasItem::draw_rect);
ObjectTypeDB::bind_method(_MD("draw_circle","pos","radius","color"),&CanvasItem::draw_circle);
ObjectTypeDB::bind_method(_MD("draw_texture","texture:Texture","pos"),&CanvasItem::draw_texture);
- ObjectTypeDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate"),&CanvasItem::draw_texture_rect,DEFVAL(false),DEFVAL(Color(1,1,1)));
- ObjectTypeDB::bind_method(_MD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)));
+ ObjectTypeDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate","transpose"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false));
ObjectTypeDB::bind_method(_MD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box);
ObjectTypeDB::bind_method(_MD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Array()),DEFVAL(Ref<Texture>()),DEFVAL(1.0));
ObjectTypeDB::bind_method(_MD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(Array()),DEFVAL(Ref<Texture>()));