diff options
Diffstat (limited to 'doc/classes/CanvasItem.xml')
-rw-r--r-- | doc/classes/CanvasItem.xml | 76 |
1 files changed, 60 insertions, 16 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 98a498d719..acf08414d0 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -48,17 +48,26 @@ </description> </method> <method name="draw_char" qualifiers="const"> - <return type="float" /> + <return type="void" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="char" type="String" /> + <argument index="3" name="font_size" type="int" default="16" /> + <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <description> + Draws a string first character using a custom font. + </description> + </method> + <method name="draw_char_outline" qualifiers="const"> + <return type="void" /> <argument index="0" name="font" type="Font" /> <argument index="1" name="pos" type="Vector2" /> <argument index="2" name="char" type="String" /> - <argument index="3" name="next" type="String" default="""" /> - <argument index="4" name="size" type="int" default="16" /> + <argument index="3" name="font_size" type="int" default="16" /> + <argument index="4" name="size" type="int" default="-1" /> <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="6" name="outline_size" type="int" default="0" /> - <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> <description> - Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character. + Draws a string first character outline using a custom font. </description> </method> <method name="draw_circle"> @@ -127,7 +136,7 @@ <argument index="4" name="outline" type="float" default="0.0" /> <argument index="5" name="pixel_range" type="float" default="4.0" /> <description> - Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontData.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. + Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius. Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation. </description> @@ -157,16 +166,34 @@ <argument index="2" name="text" type="String" /> <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" /> <argument index="4" name="width" type="float" default="-1" /> - <argument index="5" name="max_lines" type="int" default="-1" /> - <argument index="6" name="size" type="int" default="16" /> + <argument index="5" name="font_size" type="int" default="16" /> + <argument index="6" name="max_lines" type="int" default="-1" /> <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="8" name="outline_size" type="int" default="0" /> - <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> - <argument index="10" name="flags" type="int" default="99" /> + <argument index="8" name="flags" type="int" default="99" /> + <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> </method> + <method name="draw_multiline_string_outline" qualifiers="const"> + <return type="void" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="font_size" type="int" default="16" /> + <argument index="6" name="max_lines" type="int" default="-1" /> + <argument index="7" name="size" type="int" default="1" /> + <argument index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="9" name="flags" type="int" default="99" /> + <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <description> + Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + </description> + </method> <method name="draw_multimesh"> <return type="void" /> <argument index="0" name="multimesh" type="MultiMesh" /> @@ -250,11 +277,11 @@ <argument index="2" name="text" type="String" /> <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" /> <argument index="4" name="width" type="float" default="-1" /> - <argument index="5" name="size" type="int" default="16" /> + <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="7" name="outline_size" type="int" default="0" /> - <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> - <argument index="9" name="flags" type="int" default="3" /> + <argument index="7" name="flags" type="int" default="3" /> + <argument index="8" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] @@ -279,6 +306,23 @@ See also [method Font.draw_string]. </description> </method> + <method name="draw_string_outline" qualifiers="const"> + <return type="void" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="font_size" type="int" default="16" /> + <argument index="6" name="size" type="int" default="1" /> + <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="8" name="flags" type="int" default="3" /> + <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <description> + Draws [code]text[/code] outline using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + </description> + </method> <method name="draw_style_box"> <return type="void" /> <argument index="0" name="style_box" type="StyleBox" /> |