views:

13

answers:

1

I readed many forums, but never found some analogue case.

Javascript canvas font displays in a flickering fashion. The conditions appears to be:

  1. scale of the canvas is not an integer (for example setScale(0.1,0.3))
  2. setTransform(1,0,0,1,0,0); and setScale are used widely to restore setting at every draw of new objects.
  3. Windows. In linux this effect is barely visible (only in some single chars of the text !?).

If the scale is too little (0.5 or less) the effect cannot be seen.

Using save() and restore() seems to have different effect other than setTransform(1,0,0,1,0,0); ans setScale(sx,sy); so i never use them.

A: 

I solved the question opting for using only saves and restores : no more flickering. This seems to avoid direct using of setTransoform, and for some reason there should no difference in it.

Sorry for the lack of code, it's a very complicated set of instructions to extract from my coded game.

I hope this is the definitive solution to flickering. Thanks.

mizar