Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UIImage kind of object to cache offscreen images/textures #89

Open
dacap opened this issue Dec 16, 2022 · 0 comments
Open

New UIImage kind of object to cache offscreen images/textures #89

dacap opened this issue Dec 16, 2022 · 0 comments
Labels

Comments

@dacap
Copy link
Member

dacap commented Dec 16, 2022

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant