After putting a couple of hours on the problem, I am still in a daze on how
would one go about making a doughnut shape (circle with cut-out in the
center) using the drawing API.
I'm not talking about drawing a circle using:
lineStyle(BIGNUMBERHERE, color, alpha);
I'd like to put in a
Here's one I just made (and tested) from a draw circle prototype that
then draws another circle in reverse (before the endfill is applied --
necessary to get a cutout):
// r1 = radius of outer circle
// r2 = radius of inner circle (cutout)
// x, y = center of donut
29, 2005 8:16 PM
Subject: Re: [Flashcoders] How to make a doughnut?
How about making the doughnut shape as a movieclip and dynamically
applying it as a mask layer to a gradient filled cirle you create at
run-time? You could even draw the mask layer at run-time instead of
using a pre-drawn one
Solution is quite simple ;-)
Flash drawing / fill methods use XOR logic.
Here's what you want (swf and code):
http://gousable.com/flash/temp/doughnut1.html
frcfc Navneet Behal wrote:
After putting a couple of hours on the problem, I am still in a daze
on how would one go about making a
, October 29, 2005 9:54 AM
To: Flashcoders mailing list
Subject: [Flashcoders] How to make a doughnut?
After putting a couple of hours on the problem, I am still in a daze on how
would one go about making a doughnut shape (circle with cut-out in the
center) using the drawing API.
I'm not talking
flashcoders@chattyfig.figleaf.com
Sent: Saturday, October 29, 2005 7:56 PM
Subject: Re: [Flashcoders] How to make a doughnut?
Here's one I just made (and tested) from a draw circle prototype that then
draws another circle in reverse (before the endfill is applied --
necessary to get a cutout
That's a very long keyword. But yes, that's crucial. I decided to
write it up so I wouldn't forget again that it's only the mask that
requires a reverse cutout:
http://flash-creations.com/notes/dynamic_drawingapi.php#cutout
Helen
Navneet Behal wrote:
Ah.. reading the code again along with
7 matches
Mail list logo