Added two new constructors for the FXRegion class. The first enables you to construct a polygon region from a set of points, e.g.
FXPoint points[3]; points[0].x = 0; points[0].y = 0; points[1].x = 10; points[1].y = 0; points[2].x = 5; points[2].y = 5; FXRegion triRegion(points, 3); |
This constructor accepts an optional third argument to specify the fill rule for the region. If this argument is TRUE, the region is defined according to the "winding" rule, which says that a given point is considered "inside" the region (and will thus be drawn) if an infinite ray with the point as its origin crosses an unequal number of clockwise and counterclockwise directed path segments. By default, this argument is FALSE, and the region is defined according to the "even-odd" rule, which says that a point is considered "inside" if an infinite ray with the point as its origin crosses the path an odd number of times.
Note that as of this writing, the Windows implementation of this constructor has a hard-coded limit of 1024 points for the polygon shape definition (i.e. the number of points shouldn't exceed 1024).
The other new constructor enables you to construct a region from an FXRectangle.
The new reset() member function resets the region to empty.