dxIsAspectRatioAdjustmentEnabled
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 gets the current aspect ratio set by dxSetAspectRatioAdjustmentEnabled.
Syntax
bool, float dxIsAspectRatioAdjustmentEnabled ( )Returns
- bool: value1
- float: value2
This example will draw the aspect ratio to screen if aspect ratio was enabled previously.
Code Examples
shared
This example will draw the aspect ratio to screen if aspect ratio was enabled previously.
addEventHandler("onClientRender", root, function() dxSetAspectRatioAdjustmentEnabled(true)
local enabled, ratio = dxIsAspectRatioAdjustmentEnabled()
if(enabled) then dxDrawText("Aspect ratio is: " .. ratio, 250, 250) endend)See Also
Drawing Functions
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawModel3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsFormat
- dxGetPixelsSize
- dxGetStatus
- dxGetTextSize
- dxGetTexturePixels
- dxGetTextWidth
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetShaderValue
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource