Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::SetPolyFillMode
CDC                                         Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int SetPolyFillMode( int nPolyFillMode );
 
  Parameter       Description
 
  <nPolyFillMode> Specifies the new filling mode. This value may be either
                  ALTERNATE or WINDING.
 
  Remarks
 
  Sets the polygon-filling mode.
 
  When the polygon-filling mode is ALTERNATE, the system fills the area
  between odd-numbered and even-numbered polygon sides on each scan line.
  That is, the system fills the area between the first and second side,
  between the third and fourth side, and so on.
 
  When the polygon-filling mode is WINDING, the system uses the direction
  in which a figure was drawn to determine whether to fill an area. Each
  line segment in a polygon is drawn in either a clockwise or a
  counterclockwise direction. Whenever an imaginary line drawn from an
  enclosed area to the outside of a figure passes through a clockwise line
  segment, a count is incremented. When the line passes through a
  counterclockwise line segment, the count is decremented. The area is
  filled if the count is nonzero when the line reaches the outside of the
  figure.
 
  Return Value
 
  The previous filling mode. It is 0 if there is an error.
 
  See Also
 
  CDC::GetPolyFillMode, CDC::PolyPolygon, ::SetPolyFillMode
 
 
                                     -♦-