码迷,mamicode.com
首页 > Web开发 > 详细

[React] Work with HTML Canvas in React

时间:2018-02-21 10:49:18      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:ike   about   abs   mon   width   over   cal   monit   hid   

React‘s abstraction over the DOM means that it‘s not always obvious how to do DOM-related things, like working with the HTML Canvas API.

When working with HTML Canvas, HiDPI displays like Apple‘s Retina display require a bit of extra coaxing, to make sure they look crisp and sharp. This lesson covers how to write a method that automatically scales our component for the user‘s displays.

Happily, once it‘s written, you can forget all about the DPI of your users‘ monitors. It‘s totally abstracted within our component.

 

 

[React] Work with HTML Canvas in React

标签:ike   about   abs   mon   width   over   cal   monit   hid   

原文地址:https://www.cnblogs.com/Answer1215/p/8456188.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!