Difference between revisions of "Text:add"

(Created page)
 
m
Line 5: Line 5:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Text:add( textstring, x, y, angle, sx, sy, ox, oy, kx, ky )
+
index = Text:add( textstring, x, y, angle, sx, sy, ox, oy, kx, ky )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 19: Line 19:
 
{{param|number|ky (0)|Shearing / skew factor (y-axis).}}
 
{{param|number|ky (0)|Shearing / skew factor (y-axis).}}
 
=== Returns ===
 
=== Returns ===
Nothing.
+
{{param|number|index|An index number that can be used with [[Text:getWidth]] or [[Text:getHeight]].}}
  
 
== See Also ==
 
== See Also ==

Revision as of 07:45, 24 November 2015

Available since LÖVE 0.10.0
This function is not supported in earlier versions.

Adds additional text to the Text object at the specified position.

Function

Synopsis

index = Text:add( textstring, x, y, angle, sx, sy, ox, oy, kx, ky )

Arguments

string textstring
The text to add to the object.
number x
The position of the new text (x-axis).
number y
The position of the new text (y-axis).
number angle (0)
Orientation (radians).
number sx (1)
Scale factor (x-axis).
number sy (sx)
Scale factor (y-axis).
number ox (0)
Origin offset (x-axis).
number oy (0)
Origin offset (y-axis).
number kx (0)
Shearing / skew factor (x-axis).
number ky (0)
Shearing / skew factor (y-axis).

Returns

number index
An index number that can be used with Text:getWidth or Text:getHeight.

See Also

Other Languages