What is the current state of sub-pixel accuracy in the major browsers?

前端 未结 2 1813
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 03:18

I\'m working on a drawing application which requires high levels of accuracy, and I\'m wondering which of the major browser platforms (including the HTML Canvas element, and

2条回答
  •  旧时难觅i
    2020-12-15 03:46

    Currently, you can expect the best rounding and sub-pixel support to come from Mozilla with IE as the runner up. IE might end up being more fine tuned, but their release cycles are so long that Mozilla is likely to stay ahead of them.

    As far as doing sub-pixel layout, you may be chasing a wisp, because the sub-pixel advantage improves anti-aliasing issues, not screen location accuracy. Your image will never be more accurate than 1 pixel from the true position, regardless of sub-pixel support.

    The reason why some browsers don't zoom properly has nothing to do with sub-pixel support, it is because they are not remembering the exact position and rounding correctly. In other words, they are prematurely rounding the position and that causes the image to be mis-aligned.

提交回复
热议问题