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

Crisp pixel art look with image-rendering: missing consideration of scaling with ctx.scale() #23847

Open
MironFoerster opened this issue Jan 23, 2023 · 0 comments
Labels
Content:Games Games docs help wanted If you know something about this topic, we would love your help!

Comments

@MironFoerster
Copy link

MironFoerster commented Jan 23, 2023

MDN URL

https://developer.mozilla.org/en-US/docs/Games/Techniques/Crisp_pixel_art_look

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

When the canvas context is scaled using ctx.scale() the crispness of the edges is lost. The article doesn't take this case into consideration at all and doesn't provide a guide on how to solve this problem.

What did you expect to see?

It would be great to include a guide on how to keep edges crisp even with ctx.scale(). A way to do this would be to increase the resolution of the canvas by increasing its html width&height while keeping the css width&height and/or increase the resolution of the image

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@MironFoerster MironFoerster added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 23, 2023
@MironFoerster MironFoerster closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
@MironFoerster MironFoerster reopened this Jan 25, 2023
@sideshowbarker sideshowbarker added Content:Games Games docs help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Games Games docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

2 participants