DxGetTextWidth: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Client function}} ==Syntax== <syntaxhighlight lang="lua"> </syntaxhighlight> ===Required Arguments=== ===Returns=== ==Example== <syntaxhighlight lang="lua"> --TODO </syntaxhighlight> ==See Also== {{Drawing_functions}}) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
This function retrieves the theoretical width of a certain piece of text, if it were to be drawn using [[dxDrawText]]. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool dxGetTextWidth ( string text, [float scale=1,string font="default"] ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
* '''text:''' A string representing the text for which you wish to retrieve with width for. | |||
* '''scale:''' The size of the text. | |||
* '''font:''' The dx font for the text. | |||
{{DxFonts}} | |||
===Returns=== | ===Returns=== | ||
Returns a true if the operation was successful, false otherwise. | |||
==Example== | ==Example== | ||
Line 20: | Line 24: | ||
==See Also== | ==See Also== | ||
{{Drawing_functions}} | {{Drawing_functions}} | ||
[[Category:Needs_Example]] |
Revision as of 19:13, 2 March 2008
This function retrieves the theoretical width of a certain piece of text, if it were to be drawn using dxDrawText.
Syntax
bool dxGetTextWidth ( string text, [float scale=1,string font="default"] )
Required Arguments
- text: A string representing the text for which you wish to retrieve with width for.
- scale: The size of the text.
- font: The dx font for the text.
- "default": Tahoma
- "default-bold": Tahoma Bold
- "clear": Verdana
- "arial": Arial
- "sans": Microsoft Sans Serif
- "pricedown": Pricedown (GTA's theme text)
- "bankgothic": Bank Gothic Medium
- "diploma": Diploma Regular
- "beckett": Beckett Regular
- "unifont": Unifont
Returns
Returns a true if the operation was successful, false otherwise.
Example
--TODO
See Also
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextSize
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource