Region class (gdiplusheaders.h)

The Region class describes an area of the display surface. The area can be any shape. In other words, the boundary of the area can be a combination of curved and straight lines. Regions can also be created from the interiors of rectangles, paths, or a combination of these. Regions are used in clipping and hit-testing operations.

Inheritance

The Region class implements GdiplusBase.

Methods

The Region class has these methods.

 
Region::Clone

The Region::Clone method makes a copy of this Regionobject and returns the address of the new Regionobject.
Region::Complement

The Region::Complement method updates this region to the portion of the specified path's interior that does not intersect this region.
Region::Complement

The Region::Complement method updates a region that does not intersect this region.
Region::Complement

The Region::Complement method updates this region to the portion of the specified rectangle's interior that does not intersect this region.
Region::Complement

The Region::Complement method updates this region to the portion of another region that does not intersect this region.
Region::Equals

The Region::Equals method determines whether this region is equal to a specified region.
Region::Exclude

The Region::Exclude method updates this region to the portion of itself that does not intersect the specified path's interior.
Region::Exclude

The Region::Exclude method updates a region that does not intersect the specified rectangle's interior.
Region::Exclude

The Region::Exclude method updates this region to the portion of itself that does not intersect the specified rectangle's interior.
Region::Exclude

The Region::Exclude method updates this region to the portion of itself that does not intersect another region.
Region::FromHRGN

The Region::FromHRGN method creates a Windows GDI+Region object from a Windows Graphics Device Interface (GDI)  region.
Region::GetBounds

The Region::GetBounds method gets a rectangle that encloses this region. (overload 2/2)
Region::GetBounds

The Region::GetBounds method gets a rectangle that encloses this region. (overload 1/2)
Region::GetData

The Region::GetData method gets data that describes this region.
Region::GetDataSize

The Region::GetDataSize method gets the number of bytes of data that describes this region.
Region::GetHRGN

The Region::GetHRGN method creates a Windows Graphics Device Interface (GDI) region from this region.
Region::GetLastStatus

The Region::GetLastStatus method returns a value that indicates the nature of this Regionobject's most recent method failure.
Region::GetRegionScans

The Region::GetRegionScans method gets an array of rectangles that approximate this region. The region is transformed by a specified matrix before the rectangles are calculated.
Region::GetRegionScans

The Region::GetRegionScans method gets an array of rectangles that approximate this region.
Region::GetRegionScansCount

The Region::GetRegionScansCount method gets the number of rectangles that approximate this region. The region is transformed by a specified matrix before the rectangles are calculated.
Region::Intersect

The Region::Intersect method updates this region to the portion of itself that intersects the specified path's interior.
Region::Intersect

The Region::Intersect method updates a region intersects the specified rectangle's interior.
Region::Intersect

The Region::Intersect method updates this region to the portion of itself that intersects the specified rectangle's interior.
Region::Intersect

The Region::Intersect method updates this region to the portion of itself that intersects another region.
Region::IsEmpty

The Region::IsEmpty method determines whether this region is empty.
Region::IsInfinite

The Region::IsInfinite method determines whether this region is infinite.
Region::IsVisible

The Region::IsVisible method determines whether a point is inside this region. (overload 1/4)
Region::IsVisible

The Region::IsVisible method determines whether a point is inside this region. (overload 4/4)
Region::IsVisible

The Region::IsVisible method determines whether a rectangle intersects this region. (overload 2/4)
Region::IsVisible

The Region::IsVisible method determines whether a rectangle intersects this region. (overload 4/4)
Region::IsVisible

The Region::IsVisible method determines whether a point is inside this region. (overload 2/4)
Region::IsVisible

The Region::IsVisible method determines whether a rectangle intersects this region. (overload 3/4)
Region::IsVisible

The Region::IsVisible method determines whether a point is inside this region. (overload 3/4)
Region::IsVisible

The Region::IsVisible method determines whether a rectangle intersects this region. (overload 1/4)
Region::MakeEmpty

The Region::MakeEmpty method updates this region to an empty region. In other words, the region occupies no space on the display device.
Region::MakeInfinite

The Region::MakeInfinite method updates this region to an infinite region.
Region::Region

Creates a region that is infinite. This is the default constructor. (Region.Region)
Region::Region

Creates a region that is defined by data obtained from another region.
Region::Region

Creates a region that is defined by a path (a GraphicsPath object) and has a fill mode that is contained in the GraphicsPath object.
Region::Region

Creates a region that is defined by a rectangle. (overload 1/2)
Region::Region

Creates a region that is defined by a rectangle. (overload 2/2)
Region::Region

Creates a region that is infinite. This is the default constructor. (overload 2/3)
Region::Region

Creates a region that is infinite. This is the default constructor. (overload 1/3)
Region::Region

Creates a region that is identical to the region that is specified by a handle to a Windows Graphics Device Interface (GDI) region.
Region::Transform

The Region::Transform method transforms this region by multiplying each of its data points by a specified matrix.
Region::Translate

The Region::Translate method offsets this region by specified amounts in the horizontal and vertical directions. (overload 1/2)
Region::Translate

The Region::Translate method offsets this region by specified amounts in the horizontal and vertical directions. (overload 2/2)
Region::Union

The Region::Union method updates this region to all portions (intersecting and nonintersecting) of itself and all portions of the specified path's interior.
Region::Union

The Region::Union method updates this region.
Region::Union

The Region::Union method updates this region to all portions (intersecting and nonintersecting) of itself and all portions of the specified rectangle's interior.
Region::Union

The Region::Union method updates this region to all portions (intersecting and nonintersecting) of itself and all portions of another region.
Region::Xor

The Region::Xor method updates this region to the nonintersecting portions of itself and the specified path's interior.
Region::Xor

The Region::Xor method updates a region to the nonintersecting portions with a rectangle's interior.
Region::Xor

The Region::Xor method updates this region to the nonintersecting portions of itself and the specified rectangle's interior.
Region::Xor

The Region::Xor method updates this region to the nonintersecting portions of itself and another region.

Remarks

A GDI+ region is stored in world coordinates whereas a GDI region is stored in device coordinates. Therefore, a GDI+ region is scalable and a GDI region is not. For more information, see the Scalable Regions section in New Features.

An application can use regions to clip the output of drawing operations. The Window Manager uses regions to define the drawing area of windows. These regions are called clipping regions. An application can also use regions in hit-testing operations, such as checking whether a point is in a region or whether a rectangle intersects a region. For more information, see Regions, Clipping, and Using Regions.

Requirements

Requirement Value
Target Platform Windows
Header gdiplusheaders.h