public ShapeFillMode FillMode { get; set; }
Public Property FillMode As ShapeFillMode
Get
Set
public:
property ShapeFillMode FillMode {
ShapeFillMode get ();
void set (ShapeFillMode value);
}
member FillMode : ShapeFillMode with get, set
If a polygon has no self-crossing lines, then both fill modes produce the same result, in which case the default Alternate mode can be a better choice because it is faster.
The following examples demonstrate the difference between the two fill modes:
Description | Image Example |
---|---|
FillMode = ShapeFillMode.Alternate (default): When scanning the region of a polygon to be filled, a point is considered to be the part of the polygon if the scanline crosses odd number of lines before reaching the point to be drawn, and is considered not to be the part of the polygon if the scanline crosses even number of lines. This strategy is faster than the NonZero mode, though it may produce "holes" when a polygon has self-crossing lines. | ![]() |
FillMode = ShapeFillMode.NonZero: It considers the direction of the path segments at each intersection, adding/subtracting one at every clockwise/counterclockwise intersection. The point is considered to be the part of the polygon if the sum is not zero. | ![]() |