Merge pull request #45577 from Birdulon/DocDrawString

[3.3] Documentation: Correct CanvasItem.draw_string position description
This commit is contained in:
Rémi Verschelde 2021-03-17 15:16:10 +01:00 committed by GitHub
commit ea9c1c0a94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -297,7 +297,7 @@
<argument index="4" name="clip_w" type="int" default="-1">
</argument>
<description>
Draws [code]text[/code] 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.
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]
[codeblock]
# If using this method in a script that redraws constantly, move the

View file

@ -65,7 +65,7 @@
<argument index="1" name="next" type="int" default="0">
</argument>
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
Returns the size of a character, optionally taking kerning into account if the next character is provided. Note that the height returned is the font height (see [method get_height]) and has no relation to the glyph height.
</description>
</method>
<method name="get_descent" qualifiers="const">
@ -88,7 +88,7 @@
<argument index="0" name="string" type="String">
</argument>
<description>
Returns the size of a string, taking kerning and advance into account.
Returns the size of a string, taking kerning and advance into account. Note that the height returned is the font height (see [method get_height]) and has no relation to the string.
</description>
</method>
<method name="get_wordwrap_string_size" qualifiers="const">