This method resizes a pixmap to make it larger or smaller.
| Parameter | Description | | width, height | The dimensions for resizing the pixmap |
If successful a new pixmap is returned, otherwise nil is retuend.
--Get the displays
local displays = GetDisplays()
--Create window
local window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR)
--Create user interface
local ui = CreateInterface(window)
--Create a pixmap
local pixmap = LoadPixmap("https://github.com/UltraEngine/Documentation/raw/master/Assets/Materials/Ground/dirt01.dds")
--Resize the pixmap
pixmap = pixmap:Resize(128, 128)
--Show the pixmap
ui.background:SetPixmap(pixmap)
while true do
local ev = WaitEvent()
if ev.id == EVENT_WINDOWCLOSE then
return 0
end
end