Skip to content

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

@dacap

Description

@dacap

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions