[Label] Add get_character_bounds method to get bounding rectangles of the characters.

This commit is contained in:
bruvzg
2023-10-30 14:30:22 +02:00
parent bf8dd73e9d
commit e9c219cff2
3 changed files with 132 additions and 0 deletions

View File

@@ -10,6 +10,13 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="get_character_bounds" qualifiers="const">
<return type="Rect2" />
<param index="0" name="pos" type="int" />
<description>
Returns the bounding rectangle of the character at position [param pos]. If the character is a non-visual character or [param pos] is outside the valid range, an empty [Rect2] is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>