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

Problem on high DPI Displays #16

Open
puschie286 opened this issue Aug 18, 2022 · 0 comments
Open

Problem on high DPI Displays #16

puschie286 opened this issue Aug 18, 2022 · 0 comments

Comments

@puschie286
Copy link

Hi,
on high dpi display you might get a very blurry result ( based on the actual size of your image ).

this can be fixed, by scaling the canvas based on the pixel ratio.
Example ( add to init function ):

const rect = this.canvas.getBoundingClientRect();
this.canvas.width = rect.width * devicePixelRatio;
this.canvas.height = rect.height * devicePixelRatio;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant