websanova / wScratchPad

jQuery Scratch Pad Plugin
http://www.websanova.com/plugins/websanova/scratchpad
389 stars 176 forks source link

Retina Support #28

Open mbarwick83 opened 10 years ago

mbarwick83 commented 10 years ago

Any way to implement retina support? Canvas is blurry on retina displays, etc.

I've used this before, but can't seem to get it to work within your code:

// retina conversion if(window.devicePixelRatio == 2) { canvas.setAttribute('width', 800); canvas.setAttribute('height', 160); ctx.scale(2, 2); }

grexican commented 10 years ago

@mbarwick83 Check out my pull request. If you can't wait until it gets merged in, just see the small code snippet to copy & paste into the source. I took your code and modified it to fit in dynamically into the plugin source.

websanova commented 10 years ago

Just pushed an update on this request including a minified version tagged at 2.1.0, let me know if that works.

sy-tang commented 10 years ago

@websanova It seems not working on some devices like samsung. Any one fix that?

grexican commented 10 years ago

Sorry, no samsung device to test on here. I assume that it just isn't a high quality canvas? Or is there something else going on?