2.7 Region Functions

Region functions create, alter, and retrieve information about regions. A region is an elliptical or polygonal area within a window that can be filled with graphical output. An application uses these functions in conjunction with the clipping functions to create clipping regions. For more information about clipping functions, see Section 2.8, “Clipping Functions.” The following list briefly describes each region function:

Function Description  
CombineRgn Combines two existing regions into a new region.  
CreateEllipticRgn Creates an elliptical region.  
CreateEllipticRgnIndirect Creates an elliptical region.  
CreatePolygonRgn Creates a polygonal region.  
CreatePolyPolygonRgn Creates a region consisting of a series of closed polygons that are filled as though they were a single polygon.  
CreateRectRgn Creates a rectangular region.  
CreateRectRgnIndirect Creates a rectangular region.  
CreateRoundRectRgn Creates a rounded rectangular region.  
EqualRgn Determines whether two regions are identical.  
FillRgn Fills the given region with a brush pattern.  
FrameRgn Draws a border for a given region.  
GetRgnBox Retrieves the coordinates of the bounding rectangle of a region.  
InvertRgn Inverts the colors in a region.  
OffsetRgn Moves the given region.  
Function Description  
PaintRgn Fills the region with the selected brush pattern.  
PtInRegion Tests whether a point is within a region.  
RectInRegion Tests whether any part of a rectangle is within a region.  
SetRectRgn Creates a rectangular region.