HU/dxGetMaterialSize
From Multi Theft Auto: Wiki
Ez visszadja a kínált material elemek méretét.
Szintaxis
int, int [, int] dxGetMaterialSize ( element material )
OOP Syntax Help! I don't understand this!
- Method: material:getSize(...)
Kötelező paraméterek
- material : The material element whose size is to be gotten
Visszatérési érték
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.
Példa
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 |
Lásd még
- HU/dxConvertPixels
- HU/dxCreateFont
- HU/dxCreateRenderTarget
- HU/dxCreateScreenSource
- HU/dxCreateShader
- HU/dxCreateTexture
- HU/dxDrawCircle
- HU/dxDrawImage
- HU/dxDrawImageSection
- HU/dxDrawLine
- HU/dxDrawLine3D
- HU/dxDrawMaterialLine3D
- HU/dxDrawMaterialPrimitive
- HU/dxDrawPrimitive
- HU/dxDrawMaterialSectionLine3D
- HU/dxDrawRectangle
- HU/dxDrawText
- HU/dxGetBlendMode
- HU/dxGetFontHeight
- HU/dxGetMaterialSize
- HU/dxGetPixelColor
- HU/dxGetPixelsSize
- HU/dxGetPixelsFormat
- HU/dxGetStatus
- HU/dxGetTextWidth
- HU/dxGetTexturePixels
- HU/dxSetAspectRatioAdjustmentEnabled
- HU/dxSetBlendMode
- HU/dxSetPixelColor
- HU/dxSetRenderTarget
- HU/dxSetShaderValue
- HU/dxSetShaderTessellation
- HU/dxSetShaderTransform
- HU/dxSetTestMode
- HU/dxSetTextureEdge
- HU/dxSetTexturePixels
- HU/dxUpdateScreenSource
Fordította
2018.11.27. Surge