New UIImage kind of object to cache offscreen images/textures

Open
#89 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
lua

Research direction

Start by tracing the existing Image, GraphicsContext, Canvas, and Dialog canvas APIs mentioned in the issue. Clarify the required UIImage construction paths and offscreen painting behavior, then verify that drawImage accepts the resulting object in onpaint.

Written by the indexing model from the issue text.

Description

feature

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
}
Dominant language
No language data
Stars
310
Forks
68
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aseprite/api

All issues in aseprite/api

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.