首页 > Web开发 > 详细

[React] Work with HTML Canvas in React

时间:2018-02-21 10:16:26      阅读:264      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!