api
api copied to clipboard
New UIImage kind of object to cache offscreen images/textures
We should be able to create an UIImage()
from an Image
(and maybe from scratch or other objects), and getting a GraphicsContext
from it so we can paint on it as an offscreen Canvas
object. The UIImage
should be able to be the fastest representation to paint an image on the screen.
E.g.
local img = UIImage(app.activeImage)
Dialog():canvas{ ...
onpaint=function(ev)
local ctx = ev.context
ctx:drawImage(img, 0, 0)
end
}