How can I get the flash drawing api to not "inverse" fill during a filled object drawing operation?
On behalf of zefrank @ pumpkins.zefrank.com:
I reported a bug to ze that if you continue to draw on the pumpkin, it will redraw the parts you already cut out. He said that if you draw any filled object in flash it will happen.
Is there another way to structure the drawing code so this doesn't happen?
Here's an example 开发者_如何转开发of what is happening. You start to draw at the origin and don't let up on the mouse button as you start to draw a square.
Flash completes your fill to the origin (red color is the fill color).
At this point, the mouse is at the 3rd point in the square and everything looks correct. Now as I start to draw back across the square down the "mouse drag" line, you get this:
Section A is not filled with red, and this is desired. Otherwise we wouldn't be able to ever draw any acute angle (? geometry was a long time ago) objects.
But when we cross back into our completed object, we get this:
Part B reverts to being unfilled and this is not desired (in this case, since we're carving pumpkins).
You can try it out here if this is too confusing.
Essentially, I'm trying to figure out if there's a way to have flash keep part B filled, but behave the same way during the drawing for part A.
That's because of the winding mode used in Flash by default (filling an area twice un-fills it). This can be solved with the new drawing API features in Flash 10 by using the NON_ZERO winding mode.
精彩评论