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

Canvas.DrawImage #784

Closed
Shadowblitz16 opened this issue Mar 23, 2020 · 1 comment · Fixed by #878
Closed

Canvas.DrawImage #784

Shadowblitz16 opened this issue Mar 23, 2020 · 1 comment · Fixed by #878
Assignees
Labels
Core Area: Duality runtime or launcher Discussion Nothing to be done until decided otherwise Nice2Have Beneficial, but only very slightly so

Comments

@Shadowblitz16
Copy link

Summary

Please add the following for easy image drawing through the canvas...
void Canvas.DrawImage(Rect dst, Rect src, Material material, float rotation, ColorRgba blend);

Analysis

This allows for high level image drawing.
both rects would be in pixels

Pros

  • Easy to draw images
@Barsonax Barsonax added Nice2Have Beneficial, but only very slightly so Discussion Nothing to be done until decided otherwise Core Area: Duality runtime or launcher labels Apr 20, 2020
@SirePi SirePi self-assigned this Sep 21, 2020
SirePi added a commit to SirePi/duality that referenced this issue Oct 17, 2020
ilexp added a commit that referenced this issue Dec 27, 2020
Co-authored-by: Adam <adam@ilexp.net>
@ilexp ilexp linked a pull request Dec 27, 2020 that will close this issue
@ilexp
Copy link
Member

ilexp commented Dec 27, 2020

Partially addressed in #878: There is now a high-level canvas.DrawImage method that provides a shortcut for quickly drawing a texture as-is, at a specified position.

The more complex operations that you mentioned can already be achieved by using existing Canvas API and would lead to an explosion in the number of required overloads when incorporated directly into DrawImage, so they're not part of the API for now. This could be added later on, if needed, but would require additional design consideration.

Closing this for now, to be potentially re-evaluated as needed.

@ilexp ilexp closed this as completed Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Area: Duality runtime or launcher Discussion Nothing to be done until decided otherwise Nice2Have Beneficial, but only very slightly so
Development

Successfully merging a pull request may close this issue.

4 participants