DxGetMaterialSize: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(add oop syntax) |
||
Line 7: | Line 7: | ||
int, int [, int] dxGetMaterialSize ( element material ) | int, int [, int] dxGetMaterialSize ( element material ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[material]]:getSize}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''material :''' The material element whose size is to be gotten | *'''material :''' The material element whose size is to be gotten |
Revision as of 19:52, 2 January 2015
This gets the dimensions of the supplied material element.
Syntax
int, int [, int] dxGetMaterialSize ( element material )
OOP Syntax Help! I don't understand this!
- Method: material:getSize(...)
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. If the material is a volume texture, this function will return three ints representing the width, height and depth.
Example
myTexture = dxCreateTexture( "man.png" ) local width, height = dxGetMaterialSize( myTexture ) outputChatBox( "man.png is " .. tostring(width) .. " pixels wide and " .. tostring(height) .. " pixels high" )
Changelog
Version | Description |
---|
1.3.0-9.04021 | Added third return value for volume textures |
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