dxGetMaterialSize
Cliente
Devuelve el tamaño de una imagen en píxeles.
int, int dxGetMaterialSize(texture|dui material)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| material | texture|dui | La imagen: textura, render target, screen source o dui. |
Retorno
El ancho y el alto. Un argumento que no es imagen genera un error.
Ejemplo
local tex = engineCreateTexture("images/map.png")
local w, h = dxGetMaterialSize(tex)
print("el mapa mide " .. w .. "x" .. h)