xtd - Reference Guide 0.2.0
xtd::drawing::region Class Referencefinal

#include <region.h>

Definition

Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.

class drawing_export_ region final : public xtd::object
Inheritance
xtd::objectxtd::drawing::region
Namespace
xtd::drawing
Library
xtd.drawing
Remarks
A region is scalable because its coordinates are specified in world coordinates. On a drawing surface, however, its interior is dependent on the size and shape of the pixels representing it. An application can use regions to clip the output of drawing operations. These regions are called clipping regions. For more information on using regions for clipping,
An application can also use regions in hit-testing operations, such as checking whether a point or a rectangle intersects a region.
An application can fill a region by using the xtd::drawing::graphics::fill_region method and a xtd::drawing::brush object.

Constructors

 region ()
 Initializes a new xtd::drawing::region. More...
 
 region (const xtd::drawing::drawing2d::graphics_path &path)
 Initializes a new xtd::drawing::region with the specified xtd::drawing::graphics_path. More...
 
 region (const xtd::drawing::rectangle &rect)
 Initializes a new xtd::drawing::region from the specified xtd::drawing::rectangle structure. More...
 
 region (const xtd::drawing::rectangle_f &rect)
 Initializes a new xtd::drawing::region from the specified xtd::drawing::rectangle_f structure. More...
 

Properties

intptr_t handle () const
 Gets the handle of the region. More...
 

Methods

void complement (const xtd::drawing::drawing2d::graphics_path &path)
 Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::graphics_path that does not intersect with this xtd::drawing::region. More...
 
void complement (const xtd::drawing::rectangle &rect)
 Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::rectangle structure that does not intersect with this xtd::drawing::region. More...
 
void complement (const xtd::drawing::rectangle_f &rect)
 Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::rectangle_f structure that does not intersect with this xtd::drawing::region. More...
 
void complement (const xtd::drawing::region &region)
 Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::region that does not intersect with this xtd::drawing::region. More...
 
void exclude (const xtd::drawing::drawing2d::graphics_path &path)
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::graphics_path. More...
 
void exclude (const xtd::drawing::rectangle &rect)
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::rectangle structure. More...
 
void exclude (const xtd::drawing::rectangle_f &rect)
 The xtd::drawing::rectangle_f structure to exclude from this xtd::drawing::region. More...
 
void exclude (const xtd::drawing::region &region)
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::region. More...
 
xtd::drawing::rectangle_f get_bounds () const
 Gets a xtd::drawing::rectangle_f structure that represents a rectangle that bounds this xtd::drawing::region on the drawing surface of a xtd::drawing::graphics object. More...
 
xtd::drawing::rectangle_f get_bounds (const xtd::drawing::graphics &g) const
 Gets a xtd::drawing::rectangle_f structure that represents a rectangle that bounds this xtd::drawing::region on the drawing surface of a xtd::drawing::graphics object. More...
 
intptr_t get_hrgn (const xtd::drawing::graphics &g) const
 Returns a Windows handle to this xtd::drawing::region in the specified graphics context. More...
 
void intersect (const xtd::drawing::drawing2d::graphics_path &path)
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::graphics_path. More...
 
void intersect (const xtd::drawing::rectangle &rect)
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle structure. More...
 
void intersect (const xtd::drawing::rectangle_f &rect)
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle_f structure. More...
 
void intersect (const xtd::drawing::region &region)
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::region. More...
 
bool is_empty () const noexcept
 Tests whether this xtd::drawing::region has an empty interior. More...
 
bool is_empty (const xtd::drawing::graphics &g) const noexcept
 Tests whether this xtd::drawing::region has an empty interior on the specified drawing surface. More...
 
bool is_infinite () const noexcept
 Tests whether this xtd::drawing::region has an infinite interior. More...
 
bool is_infinite (const xtd::drawing::graphics &g) const noexcept
 Tests whether this xtd::drawing::region has an infinite interior on the specified drawing surface. More...
 
bool is_visible (xtd::drawing::rectangle_f rect, const xtd::drawing::graphics &g) const noexcept
 Tests whether any portion of the specified xtd::drawing::rectangle_f structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (float x, float y, float width, float height, const xtd::drawing::graphics &g) const noexcept
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (xtd::drawing::rectangle rect, const xtd::drawing::graphics &g) const noexcept
 Tests whether any portion of the specified xtd::drawing::rectangle structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (int32_t x, int32_t y, int32_t width, int32_t height, const xtd::drawing::graphics &g) const noexcept
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (xtd::drawing::rectangle_f rect) const noexcept
 Tests whether any portion of the specified xtd::drawing::rectangle_f structure is contained within this xtd::drawing::region. More...
 
bool is_visible (float x, float y, float width, float height) const noexcept
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region. More...
 
bool is_visible (xtd::drawing::rectangle rect) const noexcept
 Tests whether any portion of the specified xtd::drawing::rectangle structure is contained within this xtd::drawing::region. More...
 
bool is_visible (int32_t x, int32_t y, int32_t width, int32_t height) const noexcept
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region. More...
 
bool is_visible (xtd::drawing::point_f pt, const xtd::drawing::graphics &g) const noexcept
 Tests whether the specified PointF structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (float x, float y, const xtd::drawing::graphics &g) const noexcept
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (xtd::drawing::point pt, const xtd::drawing::graphics &g) const noexcept
 Tests whether the specified Point structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (int32_t x, int32_t y, const xtd::drawing::graphics &g) const noexcept
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (xtd::drawing::point_f pt) const noexcept
 Tests whether the specified PointF structure is contained within this xtd::drawing::region. More...
 
bool is_visible (float x, float y) const noexcept
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
bool is_visible (xtd::drawing::point pt) const noexcept
 Tests whether the specified Point structure is contained within this xtd::drawing::region. More...
 
bool is_visible (int32_t x, int32_t y) const noexcept
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics. More...
 
void make_empty ()
 Initializes this xtd::drawing::region to an empty interior. More...
 
void make_infinite ()
 Initializes this xtd::drawing::region object to an infinite interior. More...
 
void make_union (const xtd::drawing::drawing2d::graphics_path &path)
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::graphics_path. More...
 
void make_union (const xtd::drawing::rectangle &rect)
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle structure. More...
 
void make_union (const xtd::drawing::rectangle_f &rect)
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle_f structure. More...
 
void make_union (const xtd::drawing::region &region)
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::region. More...
 
void make_xor (const xtd::drawing::drawing2d::graphics_path &path)
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::graphics_path. More...
 
void make_xor (const xtd::drawing::rectangle &rect)
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle structure. More...
 
void make_xor (const xtd::drawing::rectangle_f &rect)
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle_f structure. More...
 
void make_xor (const xtd::drawing::region &region)
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::region. More...
 
void release_hrgn (intptr_t region_handle)
 Releases the handle of the xtd::drawing::region. More...
 
void translate (int32_t dx, int32_t dy)
 Offsets the coordinates of this xtd::drawing::region by the specified amount. More...
 
void translate (float dx, float dy)
 Offsets the coordinates of this xtd::drawing::region by the specified amount. More...
 
static xtd::drawing::region from_hrgn (intptr_t hrgn)
 Initializes a new xtd::drawing::region from a handle to the specified existing GDI region. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ region() [1/4]

xtd::drawing::region::region ( )

Initializes a new xtd::drawing::region.

Remarks
This constructor initializes a new xtd::drawing::region with an infinite interior.

◆ region() [2/4]

xtd::drawing::region::region ( const xtd::drawing::drawing2d::graphics_path path)

Initializes a new xtd::drawing::region with the specified xtd::drawing::graphics_path.

Parameters
pathA xtd::drawing::graphics_path that defines the new xtd::drawing::region.
Remarks
This method creates a new xtd::drawing::region with a xtd::drawing::graphics_path. The new region is defined as the interior of the xtd::drawing::graphics_path specified by the path parameter.

◆ region() [3/4]

xtd::drawing::region::region ( const xtd::drawing::rectangle rect)

Initializes a new xtd::drawing::region from the specified xtd::drawing::rectangle structure.

Parameters
rectA xtd::drawing::rectangle structure that defines the interior of the new xtd::drawing::region.
Remarks
This method creates a new xtd::drawing::region with a rectangular interior. The interior is defined by the rect parameter.

◆ region() [4/4]

xtd::drawing::region::region ( const xtd::drawing::rectangle_f rect)

Initializes a new xtd::drawing::region from the specified xtd::drawing::rectangle_f structure.

Parameters
rectA xtd::drawing::rectangle_f structure that defines the interior of the new xtd::drawing::region.
Remarks
This method creates a new xtd::drawing::region with a rectangular interior. The interior is defined by the rect parameter.

Member Function Documentation

◆ complement() [1/4]

void xtd::drawing::region::complement ( const xtd::drawing::drawing2d::graphics_path path)

Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::graphics_path that does not intersect with this xtd::drawing::region.

Parameters
pathThe xtd::drawing::graphics_path to complement this xtd::drawing::region.

◆ complement() [2/4]

void xtd::drawing::region::complement ( const xtd::drawing::rectangle rect)

Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::rectangle structure that does not intersect with this xtd::drawing::region.

Parameters
rectThe xtd::drawing::rectangle structure to complement this xtd::drawing::region.

◆ complement() [3/4]

void xtd::drawing::region::complement ( const xtd::drawing::rectangle_f rect)

Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::rectangle_f structure that does not intersect with this xtd::drawing::region.

Parameters
rectThe xtd::drawing::rectangle_f structure to complement this xtd::drawing::region.

◆ complement() [4/4]

void xtd::drawing::region::complement ( const xtd::drawing::region region)

Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::region that does not intersect with this xtd::drawing::region.

Parameters
regionThe xtd::drawing::region object to complement this xtd::drawing::region object.

◆ exclude() [1/4]

void xtd::drawing::region::exclude ( const xtd::drawing::drawing2d::graphics_path path)

Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::graphics_path.

Parameters
pathThe xtd::drawing::graphics_path to exclude from this xtd::drawing::region.

◆ exclude() [2/4]

void xtd::drawing::region::exclude ( const xtd::drawing::rectangle rect)

Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::rectangle structure.

Parameters
rectThe xtd::drawing::rectangle structure to exclude from this xtd::drawing::region.

◆ exclude() [3/4]

void xtd::drawing::region::exclude ( const xtd::drawing::rectangle_f rect)

The xtd::drawing::rectangle_f structure to exclude from this xtd::drawing::region.

◆ exclude() [4/4]

void xtd::drawing::region::exclude ( const xtd::drawing::region region)

Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::region.

Parameters
regionThe xtd::drawing::region to exclude from this xtd::drawing::region.

◆ from_hrgn()

static xtd::drawing::region xtd::drawing::region::from_hrgn ( intptr_t  hrgn)
static

Initializes a new xtd::drawing::region from a handle to the specified existing GDI region.

Parameters
hrgnA handle to an existing xtd::drawing::region.
Returns
The new xtd::drawing::region.
Remarks
This method creates a new xtd::drawing::region with an interior defined by the existing xtd::drawing::region referred to by the handle in the hrgn parameter.

◆ get_bounds() [1/2]

xtd::drawing::rectangle_f xtd::drawing::region::get_bounds ( ) const

Gets a xtd::drawing::rectangle_f structure that represents a rectangle that bounds this xtd::drawing::region on the drawing surface of a xtd::drawing::graphics object.

Parameters
gThe xtd::drawing::graphics on which this xtd::drawing::region is drawn.
Returns
A xtd::drawing::rectangle_f structure that represents the bounding rectangle for this xtd::drawing::region in pixels.
Remarks
The current transformation of the graphics context is used to compute the region interior on the drawing surface. The bounding rectangle is not always the smallest possible bounding rectangle depending on the current transformation.

◆ get_bounds() [2/2]

xtd::drawing::rectangle_f xtd::drawing::region::get_bounds ( const xtd::drawing::graphics g) const

Gets a xtd::drawing::rectangle_f structure that represents a rectangle that bounds this xtd::drawing::region on the drawing surface of a xtd::drawing::graphics object.

Parameters
gThe xtd::drawing::graphics on which this xtd::drawing::region is drawn.
Returns
A xtd::drawing::rectangle_f structure that represents the bounding rectangle for this xtd::drawing::region on the specified drawing surface.
Remarks
The current transformation of the graphics context is used to compute the region interior on the drawing surface. The bounding rectangle is not always the smallest possible bounding rectangle depending on the current transformation.

◆ get_hrgn()

intptr_t xtd::drawing::region::get_hrgn ( const xtd::drawing::graphics g) const

Returns a Windows handle to this xtd::drawing::region in the specified graphics context.

Parameters
gThe xtd::drawing::graphics on which this xtd::drawing::region is drawn.
Returns
A Windows handle to this xtd::drawing::region.
Remarks
You are responsible for calling the xtd;;region::release_hrgn method to free the memory used by the GDI region object.

◆ handle()

intptr_t xtd::drawing::region::handle ( ) const

Gets the handle of the region.

Returns
An intptr_t that contains the handle of the region.

◆ intersect() [1/4]

void xtd::drawing::region::intersect ( const xtd::drawing::drawing2d::graphics_path path)

Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::graphics_path.

Parameters
pathThe xtd::drawing::graphics_path to intersect with this xtd::drawing::region.

◆ intersect() [2/4]

void xtd::drawing::region::intersect ( const xtd::drawing::rectangle rect)

Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle structure.

Parameters
Thextd::drawing::rectangle structure to intersect with this xtd::drawing::region.

◆ intersect() [3/4]

void xtd::drawing::region::intersect ( const xtd::drawing::rectangle_f rect)

Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle_f structure.

Parameters
rectThe xtd::drawing::rectangle_f structure to intersect with this xtd::drawing::region.

◆ intersect() [4/4]

void xtd::drawing::region::intersect ( const xtd::drawing::region region)

Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::region.

Parameters
regionThe xtd::drawing::region to intersect with this xtd::drawing::region.

◆ is_empty() [1/2]

bool xtd::drawing::region::is_empty ( ) const
noexcept

Tests whether this xtd::drawing::region has an empty interior.

Returns
true if the interior of this xtd::drawing::region is empty; otherwise, false.
Remarks
The current transformation of the graphics context g is used to compute the region interior on the drawing surface.

◆ is_empty() [2/2]

bool xtd::drawing::region::is_empty ( const xtd::drawing::graphics g) const
noexcept

Tests whether this xtd::drawing::region has an empty interior on the specified drawing surface.

Parameters
gA xtd::drawing::graphics that represents a drawing surface.
Returns
true if the interior of this xtd::drawing::region is empty when the transformation associated with g is applied; otherwise, false.
Remarks
The current transformation of the graphics context g is used to compute the region interior on the drawing surface.

◆ is_infinite() [1/2]

bool xtd::drawing::region::is_infinite ( ) const
noexcept

Tests whether this xtd::drawing::region has an infinite interior.

Returns
true if the interior of this xtd::drawing::region is infinite; otherwise, false.
Remarks
The current transformation of the graphics context g is used to compute the region interior on the drawing surface.

◆ is_infinite() [2/2]

bool xtd::drawing::region::is_infinite ( const xtd::drawing::graphics g) const
noexcept

Tests whether this xtd::drawing::region has an infinite interior on the specified drawing surface.

Parameters
gA xtd::drawing::graphics that represents a drawing surface.
Returns
true if the interior of this xtd::drawing::region is infinite when the transformation associated with g is applied; otherwise, false.
Remarks
The current transformation of the graphics context g is used to compute the region interior on the drawing surface.

◆ is_visible() [1/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::rectangle_f  rect,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether any portion of the specified xtd::drawing::rectangle_f structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
rectThe xtd::drawing::rectangle_f structure to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when any portion of the rect is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [2/16]

bool xtd::drawing::region::is_visible ( float  x,
float  y,
float  width,
float  height,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle to test.
yThe y-coordinate of the upper-left corner of the rectangle to test.
widthThe width of the rectangle to test.
heightThe height of the rectangle to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when any portion of the specified rectangle is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [3/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::rectangle  rect,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether any portion of the specified xtd::drawing::rectangle structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
rectThe xtd::drawing::rectangle structure to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when any portion of the rect is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [4/16]

bool xtd::drawing::region::is_visible ( int32_t  x,
int32_t  y,
int32_t  width,
int32_t  height,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle to test.
yThe y-coordinate of the upper-left corner of the rectangle to test.
widthThe width of the rectangle to test.
heightThe height of the rectangle to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when any portion of the specified rectangle is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [5/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::rectangle_f  rect) const
noexcept

Tests whether any portion of the specified xtd::drawing::rectangle_f structure is contained within this xtd::drawing::region.

Parameters
rectThe xtd::drawing::rectangle_f structure to test.
Returns
true when any portion of rect is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [6/16]

bool xtd::drawing::region::is_visible ( float  x,
float  y,
float  width,
float  height 
) const
noexcept

Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle to test.
yThe y-coordinate of the upper-left corner of the rectangle to test.
widthThe width of the rectangle to test.
heightThe height of the rectangle to test.
Returns
true when any portion of the specified rectangle is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [7/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::rectangle  rect) const
noexcept

Tests whether any portion of the specified xtd::drawing::rectangle structure is contained within this xtd::drawing::region.

Parameters
rectThe xtd::drawing::rectangle structure to test.
Returns
true when any portion of rect is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [8/16]

bool xtd::drawing::region::is_visible ( int32_t  x,
int32_t  y,
int32_t  width,
int32_t  height 
) const
noexcept

Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle to test.
yThe y-coordinate of the upper-left corner of the rectangle to test.
widthThe width of the rectangle to test.
heightThe height of the rectangle to test.
Returns
true when any portion of the specified rectangle is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [9/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::point_f  pt,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether the specified PointF structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
ptThe PointF structure to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when point is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [10/16]

bool xtd::drawing::region::is_visible ( float  x,
float  y,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when the specified point is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [11/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::point  pt,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether the specified Point structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
ptThe Point structure to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when point is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [12/16]

bool xtd::drawing::region::is_visible ( int32_t  x,
int32_t  y,
const xtd::drawing::graphics g 
) const
noexcept

Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
gA xtd::drawing::graphics that represents a graphics context.
Returns
true when the specified point is contained within this xtd::drawing::region; otherwise, false.
Remarks
The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

◆ is_visible() [13/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::point_f  pt) const
noexcept

Tests whether the specified PointF structure is contained within this xtd::drawing::region.

Parameters
ptThe PointF structure to test.
Returns
true when point is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [14/16]

bool xtd::drawing::region::is_visible ( float  x,
float  y 
) const
noexcept

Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
Returns
true when the specified point is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [15/16]

bool xtd::drawing::region::is_visible ( xtd::drawing::point  pt) const
noexcept

Tests whether the specified Point structure is contained within this xtd::drawing::region.

Parameters
ptThe Point structure to test.
Returns
true when point is contained within this xtd::drawing::region; otherwise, false.

◆ is_visible() [16/16]

bool xtd::drawing::region::is_visible ( int32_t  x,
int32_t  y 
) const
noexcept

Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.

Parameters
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
Returns
true when the specified point is contained within this xtd::drawing::region; otherwise, false.

◆ make_empty()

void xtd::drawing::region::make_empty ( )

Initializes this xtd::drawing::region to an empty interior.

◆ make_infinite()

void xtd::drawing::region::make_infinite ( )

Initializes this xtd::drawing::region object to an infinite interior.

◆ make_union() [1/4]

void xtd::drawing::region::make_union ( const xtd::drawing::drawing2d::graphics_path path)

Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::graphics_path.

Parameters
pathThe xtd::drawing::graphics_path to unite with this xtd::drawing::region.

◆ make_union() [2/4]

void xtd::drawing::region::make_union ( const xtd::drawing::rectangle rect)

Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle structure.

Parameters
rectThe xtd::drawing::rectangle structure to unite with this xtd::drawing::region.

◆ make_union() [3/4]

void xtd::drawing::region::make_union ( const xtd::drawing::rectangle_f rect)

Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle_f structure.

Parameters
rectThe xtd::drawing::rectangle_f structure to unite with this xtd::drawing::region.

◆ make_union() [4/4]

void xtd::drawing::region::make_union ( const xtd::drawing::region region)

Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::region.

Parameters
regionThe xtd::drawing::region to unite with this xtd::drawing::region.

◆ make_xor() [1/4]

void xtd::drawing::region::make_xor ( const xtd::drawing::drawing2d::graphics_path path)

Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::graphics_path.

Parameters
pathThe xtd::drawing::graphics_path to Xor with this xtd::drawing::region.

◆ make_xor() [2/4]

void xtd::drawing::region::make_xor ( const xtd::drawing::rectangle rect)

Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle structure.

Parameters
pathThe xtd::drawing::rectangle structure to Xor with this xtd::drawing::region.

◆ make_xor() [3/4]

void xtd::drawing::region::make_xor ( const xtd::drawing::rectangle_f rect)

Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle_f structure.

Parameters
pathThe xtd::drawing::rectangle_f structure to Xor with this xtd::drawing::region.

◆ make_xor() [4/4]

void xtd::drawing::region::make_xor ( const xtd::drawing::region region)

Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::region.

Parameters
pathThe xtd::drawing::region to Xor with this xtd::drawing::region.

◆ release_hrgn()

void xtd::drawing::region::release_hrgn ( intptr_t  region_handle)

Releases the handle of the xtd::drawing::region.

Parameters
region_handleThe handle to the xtd::drawing::region.

◆ translate() [1/2]

void xtd::drawing::region::translate ( int32_t  dx,
int32_t  dy 
)

Offsets the coordinates of this xtd::drawing::region by the specified amount.

Parameters
dxThe amount to offset this xtd::drawing::region horizontally.
dyThe amount to offset this xtd::drawing::region vertically.

◆ translate() [2/2]

void xtd::drawing::region::translate ( float  dx,
float  dy 
)

Offsets the coordinates of this xtd::drawing::region by the specified amount.

Parameters
dxThe amount to offset this xtd::drawing::region horizontally.
dyThe amount to offset this xtd::drawing::region vertically.

The documentation for this class was generated from the following file: