summaryrefslogtreecommitdiff
path: root/doc/classes/TextLine.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TextLine.xml')
-rw-r--r--doc/classes/TextLine.xml125
1 files changed, 42 insertions, 83 deletions
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index c21da09edb..cc66f56d65 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextLine" inherits="Reference" version="4.0">
+<class name="TextLine" inherits="RefCounted" version="4.0">
<brief_description>
Holds a line of text.
</brief_description>
@@ -10,175 +10,134 @@
</tutorials>
<methods>
<method name="add_object">
- <return type="bool">
- </return>
- <argument index="0" name="key" type="Variant">
- </argument>
- <argument index="1" name="size" type="Vector2">
- </argument>
- <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
- </argument>
- <argument index="3" name="length" type="int" default="1">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="key" type="Variant" />
+ <argument index="1" name="size" type="Vector2" />
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" />
+ <argument index="3" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
</description>
</method>
<method name="add_string">
- <return type="bool">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <argument index="1" name="fonts" type="Font">
- </argument>
- <argument index="2" name="size" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="text" type="String" />
+ <argument index="1" name="fonts" type="Font" />
+ <argument index="2" name="size" type="int" />
<argument index="3" name="opentype_features" type="Dictionary" default="{
-}">
- </argument>
- <argument index="4" name="language" type="String" default="&quot;&quot;">
- </argument>
+}" />
+ <argument index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Adds text span and font to draw it.
</description>
</method>
<method name="clear">
- <return type="void">
- </return>
+ <return type="void" />
<description>
Clears text line (removes text and inline objects).
</description>
</method>
<method name="draw" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
+ <return type="void" />
+ <argument index="0" name="canvas" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_outline" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="outline_size" type="int" default="1">
- </argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
+ <return type="void" />
+ <argument index="0" name="canvas" type="RID" />
+ <argument index="1" name="pos" type="Vector2" />
+ <argument index="2" name="outline_size" type="int" default="1" />
+ <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
</description>
</method>
<method name="get_line_ascent" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
</description>
</method>
<method name="get_line_descent" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
</description>
</method>
<method name="get_line_underline_position" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns pixel offset of the underline below the baseline.
</description>
</method>
<method name="get_line_underline_thickness" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns thickness of the underline.
</description>
</method>
<method name="get_line_width" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns width (for horizontal layout) or height (for vertical) of the text.
</description>
</method>
<method name="get_object_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="key" type="Variant">
- </argument>
+ <return type="Rect2" />
+ <argument index="0" name="key" type="Variant" />
<description>
Returns bounding rectangle of the inline object.
</description>
</method>
<method name="get_objects" qualifiers="const">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
Returns array of inline objects.
</description>
</method>
<method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
+ <return type="RID" />
<description>
Returns TextServer buffer RID.
</description>
</method>
<method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
+ <return type="Vector2" />
<description>
Returns size of the bounding box of the text.
</description>
</method>
<method name="hit_test" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="coords" type="float">
- </argument>
+ <return type="int" />
+ <argument index="0" name="coords" type="float" />
<description>
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
</description>
</method>
<method name="resize_object">
- <return type="bool">
- </return>
- <argument index="0" name="key" type="Variant">
- </argument>
- <argument index="1" name="size" type="Vector2">
- </argument>
- <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="key" type="Variant" />
+ <argument index="1" name="size" type="Vector2" />
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" />
<description>
Sets new size and alignment of embedded object.
</description>
</method>
<method name="set_bidi_override">
- <return type="void">
- </return>
- <argument index="0" name="override" type="Array">
- </argument>
+ <return type="void" />
+ <argument index="0" name="override" type="Array" />
<description>
Overrides BiDi for the structured text.
Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
<method name="tab_align">
- <return type="void">
- </return>
- <argument index="0" name="tab_stops" type="PackedFloat32Array">
- </argument>
+ <return type="void" />
+ <argument index="0" name="tab_stops" type="PackedFloat32Array" />
<description>
Aligns text to the given tab-stops.
</description>