class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCounted TextParagraph
Holds a paragraph of text.

Abstraction over TextServer for handling a single paragraph of text.

HorizontalAlignment alignment<>():HorizontalAlignment

Paragraph horizontal alignment.

BitField break_flags<>():BitField

Line breaking rules. For more info see TextServer.

String custom_punctuation<>():String

Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

Direction direction<>():Direction

Text writing direction.

String ellipsis_char<>():String

Ellipsis character used for text clipping.

BitField justification_flags<>():BitField

Line fill alignment rules. See JustificationFlag for more information.

float line_spacing<>():float

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.

int max_lines_visible<>():int

Limits the lines of text shown.

Orientation orientation<>():Orientation

Text orientation.

bool preserve_control<>():bool

If set to true text will display control characters.

bool preserve_invalid<>():bool

If set to true text will display invalid characters.

OverrunBehavior text_overrun_behavior<>():OverrunBehavior

Sets the clipping behavior when the text exceeds the paragraph's set width. See OverrunBehavior for a description of all modes.

float width<>():float

Paragraph width.

bool add_object<>( Variant key=, key:Variant=, Vector2 size=, size:Vector2=, InlineAlignment inline_align=5, inline_align:InlineAlignment=5, int length=1, length:int=1, float baseline=0.0, baseline:float=0.0, ):bool

Adds inline object to the text buffer, key must be unique. In the text, object is represented as length object replacement characters.

bool add_string<>( String text=, text:String=, Font font=, font:Font=, int font_size=, font_size:int=, String language="", language:String="", Variant meta=null, meta:Variant=null, ):bool

Adds text span and font to draw it.

void clear<>():void

Clears text paragraph (removes text and inline objects).

void clear_dropcap<>():void

Removes dropcap.

void draw<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw all lines of the text and drop cap into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

void draw_dropcap<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw drop cap into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

void draw_dropcap_outline<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw drop cap outline into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

void draw_line<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw single line of text into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

void draw_line_outline<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw outline of the single line of text into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

void draw_outline<>( =, :=, =, :=, =, :=, =, :=, ):void

Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with color. pos specifies the top left corner of the bounding box.

int get_dropcap_lines<>():int

Returns number of lines used by dropcap.

RID get_dropcap_rid<>():RID

Returns drop cap text buffer RID.

Vector2 get_dropcap_size<>():Vector2

Returns drop cap bounding box size.

float get_line_ascent<>( int line=, line:int=, ):float

Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).

int get_line_count<>():int

Returns number of lines in the paragraph.

float get_line_descent<>( int line=, line:int=, ):float

Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).

Rect2 get_line_object_rect<>( int line=, line:int=, Variant key=, key:Variant=, ):Rect2

Returns bounding rectangle of the inline object.

Array get_line_objects<>( int line=, line:int=, ):Array

Returns array of inline objects in the line.

Vector2i get_line_range<>( int line=, line:int=, ):Vector2i

Returns character range of the line.

RID get_line_rid<>( int line=, line:int=, ):RID

Returns TextServer line buffer RID.

Vector2 get_line_size<>( int line=, line:int=, ):Vector2

Returns size of the bounding box of the line of text. Returned size is rounded up.

float get_line_underline_position<>( int line=, line:int=, ):float

Returns pixel offset of the underline below the baseline.

float get_line_underline_thickness<>( int line=, line:int=, ):float

Returns thickness of the underline.

float get_line_width<>( int line=, line:int=, ):float

Returns width (for horizontal layout) or height (for vertical) of the line of text.

Vector2 get_non_wrapped_size<>():Vector2

Returns the size of the bounding box of the paragraph, without line breaks.

RID get_rid<>():RID

Returns TextServer full string buffer RID.

Vector2 get_size<>():Vector2

Returns the size of the bounding box of the paragraph.

int hit_test<>( Vector2 coords=, coords:Vector2=, ):int

Returns caret character offset at the specified coordinates. This function always returns a valid position.

bool resize_object<>( Variant key=, key:Variant=, Vector2 size=, size:Vector2=, InlineAlignment inline_align=5, inline_align:InlineAlignment=5, float baseline=0.0, baseline:float=0.0, ):bool

Sets new size and alignment of embedded object.

void set_bidi_override<>( Array override=, override:Array=, ):void

Overrides BiDi for the structured text.

Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.

bool set_dropcap<>( =, :=, =, :=, =, :=, =, :=, ):bool

Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.

void tab_align<>( PackedFloat32Array tab_stops=, tab_stops:PackedFloat32Array=, ):void

Aligns paragraph to the given tab-stops.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...