Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个 Raphael JS 项目,需要显示一些透明的 PNG,只有不透明的部分可以点击。有没有办法:
由于 raphael 用于矢量图形,因此它是解决 png 问题的错误工具。我认为帆布是你要找的。将图像加载到画布中(不需要将画布推送到 DOM 中)。单击时检查坐标并将像素从画布中取出。
但也许将 png 转换为矢量图形并改用 raphael 会更容易。