TextItemGetScale: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[Category:Incomplete]]
__NOTOC__  
__NOTOC__  
This fake function is for use with blah & blah and does blahblahblabhalbhl
This function allows retrieval of the scale or size of a text item.


==Syntax==  
==Syntax==  
Line 10: Line 8:


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''textitem:''' The text item you wish to retreive the scale of
 
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' descriptiona
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns a floating point of the scale of the text. 1.0 is around 12pt.


==Example==  
==Example==  
This example does...
This example retreives the scale of the 'theTextitem' text item, and if it is too small it enlarges it so it is more visible.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
scale = textItemGetScale ( theTextitem )  --get the scale of theTextitem and define it as 'scale'
blabhalbalhb --abababa
if scale < 0.5 then --if the scale is smaller than 0.5
--This line does this...
    textItemSetScale ( theTextitem, 1.0 ) --then restore it to default size, 1.0.
mooo
end
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{Text functions}}

Revision as of 17:02, 16 August 2006

This function allows retrieval of the scale or size of a text item.

Syntax

float textItemGetScale ( textitem textitem )             

Required Arguments

  • textitem: The text item you wish to retreive the scale of

Returns

Returns a floating point of the scale of the text. 1.0 is around 12pt.

Example

This example retreives the scale of the 'theTextitem' text item, and if it is too small it enlarges it so it is more visible.

scale = textItemGetScale ( theTextitem )  --get the scale of theTextitem and define it as 'scale'
if scale < 0.5 then --if the scale is smaller than 0.5
    textItemSetScale ( theTextitem, 1.0 ) --then restore it to default size, 1.0.
end

See Also