Added a proper name and an explanation to arg4 on CanvasItem.draw_texture_rect*.

This commit is contained in:
Ovnuniarchos 2015-07-20 20:07:25 +02:00
parent dd09ae50e1
commit 43053e3a71
3 changed files with 17 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>()));