HTML5 画布画笔
我在网上搜索过,但没有找到答案。我想在 HTML5 的 canvas 元素上绘制线条,但纹理不是实心的,而是自定义的。如果您了解的话,就像 Photoshop 中的画笔一样。例如,线条看起来像是用粉笔或艺术家画笔绘制的。你知道怎么做吗?
I have searched the web and found no answer. I want to draw lines on an HTML5's canvas element but having a texture that is not solid, rather custom. Just like brushes in Photoshop if you know them. For example, to have a line that looks like it was drawn with chalk or artist paint brush. Do you know a way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不使用croquis.js?
它有简洁的 画笔实现,如 photoshop :)
这是 演示,它使用 croquis.js。
Why don't you use croquis.js?
It has neat brush implementation like photoshop :)
And here is Demo which is using croquis.js.
您是否考虑过使用 Processing.js 或 Fabric.js?
您还可以查看您可能感兴趣的此博客文章:
http://rhyolight.posterous.com/new-brushes-for-harmony-canvas-app
如果你想从头开始开发一切,你应该付出很多努力!
Have you considered using libraries such as Processing.js or Fabric.js?
You can also take a look at this blog entry that might be interesting for you:
http://rhyolight.posterous.com/new-brushes-for-harmony-canvas-app
If you want to develop everything from scratch you should put a lot of effort into it!