Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Added support for high DPI canvasses #9

Closed
wants to merge 1 commit into from

Conversation

13twelve
Copy link

In Chrome/Firefox on a retina Mac Book Pro the icons look fuzzy; added a fix that compares window.devicePixelRatio with context.backingStorePixelRatio to scale the canvas as necessary.

For Safari on high dpi screens nothing happens as it automatically solves the high DPI canvas problem.

…hrome and Firefox on high DPI screens (Safari auto handles high DPI canvas).
@Stichoza
Copy link

👍

3 similar comments
@felipemarcos
Copy link

👍

@SergioCrisostomo
Copy link

+1

@jeffehobbs
Copy link

👍

@ghost
Copy link

ghost commented Nov 11, 2015

Hi all... maybe I'm missing something, but how would built-in support for this work? Why not just make your Canvas bigger (in pixels) and downscale it to the desired size in CSS?

That's how we do it in Forecast.io!

@ghost
Copy link

ghost commented Nov 11, 2015

I should perhaps also note that this is a problem that would be fixed by moving to vector Skycons, which is addressed in #11. (It's probably the true right way to handle this!)

@13twelve
Copy link
Author

@ironwallaby because each implementation of Skycons would require everyone to do this manually and this update essentially does exactly what you suggest, automatically.

Although I agree #11 would be a better solution :-)

@ghost
Copy link

ghost commented Nov 11, 2015

@13twelve I guess this is a stylistic difference: I see it as very scary to mess about with pre-existing HTML and CSS content in JavaScript. To accept this change, I'd probably make the library generate the Canvases directly so it's known ahead of time that they're dynamically generated.

But yeah, why I don't I try to pour that effort into #11 instead :) Then we get a lot of other stuff for free!

@werose
Copy link

werose commented Sep 19, 2016

good

@ghost
Copy link

ghost commented Apr 17, 2020

Skycons is no longer maintained; please fork to do any further work on it!

@ghost ghost closed this Apr 17, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants