Astrath:createImage
Jump to navigation
Jump to search
DxImage:new
Description: Creates a DX image element. An image element displays a static image from a file on the screen.
Parameters:
path (string) – Path to the image file (must exist).
posX, posY (float) – Position on screen.
width, height (float) – Size of the image.
parent (element) – Parent DX element (optional).
relative (boolean) – Position relative to parent (optional).
Returns:
- Returns the newly created DxImage element.
Methods:
Method | Description
Ath:setVisible(boolean) - Ath:setEnabled(boolean) - Ath:setAlpha(int) - Ath:setPath(string path) - Ath:destroy() } Example: local img = DxImage:new("images/logo.png", 100, 100, 200, 150) img:setAlpha(200) img:setVisible(true) |
---|