[comp.sys.mac.programmer] Fill rules on the Mac

datpete@daimi.aau.dk (Peter Andersen) (11/28/90)

We are porting an advanced graphics system to the Mac.

The graphics system supports two different fill rules for
polygons: even-odd and zero-winding. The difference between
the two fill rules can be seen when you make the following
polygon

    |-------------|
    |             |
    |             |
    |    |---|    |
    |    |   |    |
    |----|---|    |
	 |        |
	 |--------|
  
    Even-odd fill rule	     Zero-winding fill rule
    |-------------|	     |-------------|
    |*************|	     |*************| 
    |*************|	     |*************|
    |****|---|****|	     |****|---|****|
    |****|   |****|	     |****|***|****|
    |----|---|****|	     |----|---|****|
	 |********|		  |********|
	 |--------|		  |--------|
  
    Note: the rectangle      Note: the rectangle in
    in the middle is NOT     the middle IS filled
    filled

As far as we can see the Mac only uses even-odd fillrule
when determining what is inside and outside of a polygon
(or a region for that matter).

Now to the question:
Does anybody know of a way to simulate the zero-winding
fill rule on the Mac, short of implementing your own
scan-algorithm?!


Any clues are appreciated!

/Kim, Jorgen & Peter.