textItemGetScale
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
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 retrieve the scale of
Returns
- float: value
Returns a floating point of the scale of the text. 1.0 is around 12pt.
Code Examples
shared
This example retrieves 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 store it in the 'scale' variableif scale < 0.5 then -- if the scale is smaller than 0.5 textItemSetScale ( theTextItem, 1.0 ) -- then restore it to default size, 1.0.endSee Also
Text Functions
- textCreateDisplay
- textCreateTextItem
- textDestroyDisplay
- textDestroyTextItem
- textDisplayAddObserver
- textDisplayAddText
- textDisplayGetObservers
- textDisplayIsObserver
- textDisplayRemoveObserver
- textDisplayRemoveText
- textItemGetColor
- textItemGetPosition
- textItemGetPriority
- textItemGetScale
- textItemGetText
- textItemSetColor
- textItemSetPosition
- textItemSetPriority
- textItemSetScale
- textItemSetText