DxGetMaterialSize: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Client function}} __NOTOC__ {{New feature|3.0110|1.1| Only available in 1.1 }} This gets the dimensions of the supplied material element. ==Syntax== <syntaxhighlight lang="lua"> int, in...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This gets the dimensions of the supplied [[material]] element. | This gets the dimensions of the supplied [[material]] element. | ||
Revision as of 17:35, 31 August 2011
This gets the dimensions of the supplied material element.
Syntax
int, int dxGetMaterialSize ( element material )
Required Arguments
- material : The material element whose size is to be gotten
Returns
Returns two ints representing the width and height in pixels of the material, or false if an invalid parameter was passed to the function.
Example
myTexture = dxCreateTexture( "man.png" ) int width, height = dxGetMaterialSize( myTexture ) outputChatBox( "man.png is " .. tostring(width) .. " pixels wide and " .. tostring(width) .. " pixels high" )
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