Figure 21-8 Filling Polygons: Even/Odd Fill Method

Non-Zero Winding Fill Method

The non-zerowinding fill algorithm (fill method 1) determines whether a point is inside a region enclosed by a line path using the following steps:

1Draw a ray from the point across the path segment.

2Add 1 every time the line segment crosses the ray from left to right or bottom to top.

3Subtract 1 every time the segment crosses the ray from right to left or top to bottom.

4FP fills the enclosed area in question if the sum of steps 2 and 3 is non-zero. Figure 21-9 illustrates the non-zero winding fill concept.

EN

Drawing Polygons 21-13

Page 525
Image 525
HP 5961-0509 manual Non-Zero Winding Fill Method, Filling Polygons Even/Odd Fill Method