antvis / G

💥 A flexible rendering engine for visualization.
https://g.antv.antgroup.com/
1.08k stars 202 forks source link

pixelRatio 的逻辑问题,且没有处理页面缩放 #544

Closed hustcc closed 4 years ago

hustcc commented 4 years ago

https://github.com/antvis/g/blob/2a70a95c90f25915f1b443d76447ff9cd61bab20/packages/g-canvas/src/canvas.ts#L54-L57

导致 pixelRatio 不正确,很多用户反馈图形模糊,但是在 svg 上就是 ok 的。检索到这里,大概是上述代码的问题。

不知道取整的考虑是什么?

dengfuping commented 3 years ago
hustcc commented 3 years ago

@dengfuping 发布版本了吗?

sjchao commented 3 years ago

pixelRatio是浮点数会有什么问题吗?我看F2那边并没有取整 https://github.com/antvis/F2/blob/d761b84d099c69a6a27ced338b35360b9c921688/src/graphic/engine/canvas.js#L90