GPWiki.org
GPWiki.org
It is currently Mon May 20, 2013 8:37 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: HTML5 canvas drawing
PostPosted: Sat Aug 27, 2011 9:25 am 
Shake'n'Baker
User avatar

Joined: Mon Jun 14, 2010 3:51 pm
Posts: 62
How to clear the insides of a path? It's not a rectangle so I can use clearRect().


Top
 Profile  
 
 Post subject: Re: HTML5 canvas drawing
PostPosted: Sat Aug 27, 2011 3:57 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3807
Location: Ferriday, LA, US
You can use the fill() command when defining your path. In conjunction with Canvas.globalCompositeOperation you can achieve an effect similar to clearing a path.

I'm not 100% sure what's going on with your drawing routine, so I can't give you the exact composite operations, but the HTML5 Canvas Cheat Sheet (which should be available by searching the nihilogic.dk site) should give you enough of an idea on how composite operations work.

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
 Post subject: Re: HTML5 canvas drawing
PostPosted: Sun Nov 11, 2012 8:21 am 
Level 1 Cleric
User avatar

Joined: Sun Nov 11, 2012 8:11 am
Posts: 10
Location: Toronto
https://developer.mozilla.org/samples/c ... osite.html

_________________
http://ryanspice.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group