torneditor Posted June 6, 2013 Share Posted June 6, 2013 Hi All, I looked everywhere but failed to find how to create a realistic colored pencil. Everybody shows the same script for a pencil that looks like a marker. But nodoby knows how to imitate a drawing by a real pencil like it is shown below. What do you think guys, is it possible to do ? Quote Link to comment Share on other sites More sharing options...
sbat Posted June 7, 2013 Share Posted June 7, 2013 Load a texture of the colored paper (same size as your canvas), and just copy circle from this texture to your target canvas at the place of the pen. As an optimization, you can have tiled texture of the smaller size, and colorize grayscale papertexture instead of storing multiple colors. Quote Link to comment Share on other sites More sharing options...
rich Posted June 7, 2013 Share Posted June 7, 2013 Alternatively I don't see why you couldn't have some nicely designed brush textures and just drawImage them to your canvas as the mouse moves, using a bit of clever alpha + png work you could make a nicely realistic effect. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted June 7, 2013 Share Posted June 7, 2013 take a look at this example , the crayon brush is textured : http://www.williammalone.com/projects/html5-canvas-javascript-drawing-app-with-bucket-tool/demo/drawing-app-with-bucket.html tutorial available here : http://www.williammalone.com/projects/html5-canvas-javascript-drawing-app-with-bucket-tool/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.