Canvas drawing and Retina display: doable?

前端 未结 6 1374
北荒
北荒 2020-12-15 06:13

Working with phoneGap implementing drawing with Canvas. The catch we\'ve run into is that canvas expects specific pixel dimensions. This is fine except that the iPhone 4\'s

6条回答
  •  感情败类
    2020-12-15 07:09

    There is a drop-in polyfill that will take care of most basic drawing operations for you, and remove the ambiguity between browsers that handle this automatically for you (safari) and others that don't.

    https://github.com/jondavidjohn/hidpi-canvas-polyfill

    You simply include it before your drawing code and it should give you decent retina support automatically.

提交回复
热议问题