GetTextSize: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetTextSize(text [, Scale])}} {{FuncParameters}} {{FuncParam|text |__EDIT_ME__}} {{FuncParamOption...")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Gets the size (width and height) of a text.}}


{{FuncSyntax|GetTextSize(text [, Scale])}}
{{FuncSyntax|GetTextSize(text [, Scale])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|text |__EDIT_ME__}}
{{FuncParam|text|The text which we would like to know the width and height from.}}
{{FuncParamOptional|Scale|__EDIT_ME__}}
{{FuncParamOptional|Scale|The scale at which this text would be drawn, default: 1.0}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns two float values: width, height}}


== Example ==
== Example ==
Line 15: Line 15:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[DrawText]]
* [[SetDrawColor]]
* [[SetTextDrawScale]]
* [[GetTextSize]]
* [[DrawLine]]
* [[DrawLine3D]]
* [[DrawPoint3D]]
* [[DrawCircle3D]]
* [[DrawBox]]
* [[DrawRect]]
* [[DrawTexture]]
* [[DrawTextureEx]]
* [[DrawMaterial]]

Latest revision as of 20:25, 30 August 2020

GetTextSize

Type: Function
Context: Client
Introduced: v1.0

Description

Gets the size (width and height) of a text.

Syntax

GetTextSize(text [, Scale])

Parameters

  • text
    The text which we would like to know the width and height from.
  • Scale (optional)
    The scale at which this text would be drawn, default: 1.0

Return Value

  • Returns two float values: width, height

Example

__EDIT_ME__

See also