all articles

canvas will blur when draw() right after showing

2015-07-05 @sunderls

android4.1 canvas blur js


on follow two conditions, canvas may blur

insert a new <canvas> to dom, and draw on it right away.

show an already inserted hidden <canvas> , and draw on it right away

on Retina devices, we always use 2 times size of <canvas> to avoid blurring, but on these 2 conditions, it just doesn't work, seems <canvas> on Android may be that fast to be ready.


on those special devices, use a timer to redraw .

    // redraw
}, 100);