TextItemGetScale: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Syntax) |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
float textItemGetScale ( textitem | float textItemGetScale ( textitem theTextitem ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''theTextitem:''' The text item you wish to retreive the scale of | ||
===Returns=== | ===Returns=== |
Revision as of 20:05, 16 August 2006
This function allows retrieval of the scale or size of a text item.
Syntax
float textItemGetScale ( textitem theTextitem )
Required Arguments
- theTextitem: 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
- textCreateDisplay
- textCreateTextItem
- textDestroyDisplay
- textDestroyTextItem
- textDisplayAddObserver
- textDisplayAddText
- textDisplayGetObservers
- textDisplayIsObserver
- textDisplayRemoveObserver
- textDisplayRemoveText
- textItemGetColor
- textItemGetPosition
- textItemGetPriority
- textItemGetScale
- textItemGetText
- textItemSetColor
- textItemSetPosition
- textItemSetPriority
- textItemSetScale
- textItemSetText