aseprite / aseprite/api

New UIImage kind of object to cache offscreen images/textures

Open
#89 0 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
No language data
Stars
307
Forks
68
PR merge metrics
No merged PRs in 30d

Description

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.
```lua
local img = UIImage(app.activeImage)
Dialog():canvas{ ...
onpaint=function(ev)
local ctx = ev.context
ctx:drawImage(img, 0, 0)
end
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.