xtd 1.0.0
Loading...
Searching...
No Matches
xtd::drawing::region Class Referencefinal
Inheritance diagram for xtd::drawing::region:
xtd::object xtd::iequatable< region > xtd::interface xtd::extensions::equality_operators< region, iequatable< region > >

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
region()
Initializes a new xtd::drawing::region.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
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.

Public Constructors

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

Public Properties

auto handle () const noexcept -> xtd::intptr
 Gets the handle of the region.

Public Methods

auto complement (const xtd::drawing::drawing_2d::graphics_path &path) noexcept -> void
 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.
auto complement (const xtd::drawing::rectangle &rect) noexcept -> void
 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.
auto complement (const xtd::drawing::rectangle_f &rect) noexcept -> void
 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.
auto complement (const xtd::drawing::region &region) noexcept -> void
 Updates this xtd::drawing::region to contain the portion of the specified xtd::drawing::region that does not intersect with this xtd::drawing::region.
auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const region &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto get_hash_code () const noexcept -> xtd::usize override
 Serves as a hash function for a particular type.
auto exclude (const xtd::drawing::drawing_2d::graphics_path &path) noexcept -> void
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::graphics_path.
auto exclude (const xtd::drawing::rectangle &rect) noexcept -> void
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::rectangle structure.
auto exclude (const xtd::drawing::rectangle_f &rect) noexcept -> void
 The xtd::drawing::rectangle_f structure to exclude from this xtd::drawing::region.
auto exclude (const xtd::drawing::region &region) noexcept -> void
 Updates this xtd::drawing::region to contain only the portion of its interior that does not intersect with the specified xtd::drawing::region.
auto get_bounds () const noexcept -> xtd::drawing::rectangle_f
 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.
auto get_bounds (const xtd::drawing::graphics &g) const noexcept -> xtd::drawing::rectangle_f
 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.
auto get_hrgn (const xtd::drawing::graphics &g) const noexcept -> xtd::intptr
 Returns a Windows handle to this xtd::drawing::region in the specified graphics context.
auto intersect (const xtd::drawing::drawing_2d::graphics_path &path) noexcept -> void
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::graphics_path.
auto intersect (const xtd::drawing::rectangle &rect) noexcept -> void
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle structure.
auto intersect (const xtd::drawing::rectangle_f &rect) noexcept -> void
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::rectangle_f structure.
auto intersect (const xtd::drawing::region &region) noexcept -> void
 Updates this xtd::drawing::region to the intersection of itself with the specified xtd::drawing::region.
auto is_empty () const noexcept -> bool
 Tests whether this xtd::drawing::region has an empty interior.
auto is_empty (const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether this xtd::drawing::region has an empty interior on the specified drawing surface.
auto is_infinite () const noexcept -> bool
 Tests whether this xtd::drawing::region has an infinite interior.
auto is_infinite (const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether this xtd::drawing::region has an infinite interior on the specified drawing surface.
auto is_visible (const xtd::drawing::rectangle_f &rect, const xtd::drawing::graphics &g) const noexcept -> bool
 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.
auto is_visible (float x, float y, float width, float height, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (const xtd::drawing::rectangle &rect, const xtd::drawing::graphics &g) const noexcept -> bool
 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.
auto is_visible (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (const xtd::drawing::rectangle_f &rect) const noexcept -> bool
 Tests whether any portion of the specified xtd::drawing::rectangle_f structure is contained within this xtd::drawing::region.
auto is_visible (float x, float y, float width, float height) const noexcept -> bool
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region.
auto is_visible (const xtd::drawing::rectangle &rect) const noexcept -> bool
 Tests whether any portion of the specified xtd::drawing::rectangle structure is contained within this xtd::drawing::region.
auto is_visible (xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height) const noexcept -> bool
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region.
auto is_visible (xtd::drawing::point_f pt, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether the specified PointF structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (float x, float y, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (xtd::drawing::point pt, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether the specified Point structure is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (xtd::int32 x, xtd::int32 y, const xtd::drawing::graphics &g) const noexcept -> bool
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (xtd::drawing::point_f pt) const noexcept -> bool
 Tests whether the specified PointF structure is contained within this xtd::drawing::region.
auto is_visible (float x, float y) const noexcept -> bool
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto is_visible (xtd::drawing::point pt) const noexcept -> bool
 Tests whether the specified Point structure is contained within this xtd::drawing::region.
auto is_visible (xtd::int32 x, xtd::int32 y) const noexcept -> bool
 Tests whether the specified point is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
auto make_empty () -> void
 Initializes this xtd::drawing::region to an empty interior.
auto make_infinite () noexcept -> void
 Initializes this xtd::drawing::region object to an infinite interior.
auto make_union (const xtd::drawing::drawing_2d::graphics_path &path) noexcept -> void
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::graphics_path.
auto make_union (const xtd::drawing::rectangle &rect) noexcept -> void
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle structure.
auto make_union (const xtd::drawing::rectangle_f &rect) noexcept -> void
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::rectangle_f structure.
auto make_union (const xtd::drawing::region &region) noexcept -> void
 Updates this xtd::drawing::region to the union of itself and the specified xtd::drawing::region.
auto make_xor (const xtd::drawing::drawing_2d::graphics_path &path) noexcept -> void
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::graphics_path.
auto make_xor (const xtd::drawing::rectangle &rect) noexcept -> void
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle structure.
auto make_xor (const xtd::drawing::rectangle_f &rect) noexcept -> void
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::rectangle_f structure.
auto make_xor (const xtd::drawing::region &region) noexcept -> void
 Updates this xtd::drawing::region to the union minus the intersection of itself with the specified xtd::drawing::region.
auto release_hrgn (xtd::intptr region_handle) -> void
 Releases the handle of the xtd::drawing::region.
auto translate (xtd::int32 dx, xtd::int32 dy) noexcept -> void
 Offsets the coordinates of this xtd::drawing::region by the specified amount.
auto translate (float dx, float dy) noexcept -> void
 Offsets the coordinates of this xtd::drawing::region by the specified amount.

Public Static Methods

static auto equals (const region &region, const xtd::drawing::graphics &g) noexcept -> bool
 Tests whether the specified Region is identical to this xtd::drawing::region on the specified drawing surface.
static auto from_hrgn (xtd::intptr hrgn) -> xtd::drawing::region
 Initializes a new xtd::drawing::region from a handle to the specified existing GDI region.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
virtual auto equals (const region &) const noexcept -> bool=0
 Indicates whether the current object is equal to another object of the same type.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.

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::drawing_2d::graphics_path & path)
explicit

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)
explicit

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)
explicit

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

◆ handle()

auto xtd::drawing::region::handle ( ) const -> xtd::intptr
nodiscardnoexcept

Gets the handle of the region.

Returns
An xtd::intptr that contains the handle of the region.

◆ complement() [1/4]

auto xtd::drawing::region::complement ( const xtd::drawing::drawing_2d::graphics_path & path) -> void
noexcept

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]

auto xtd::drawing::region::complement ( const xtd::drawing::rectangle & rect) -> void
noexcept

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]

auto xtd::drawing::region::complement ( const xtd::drawing::rectangle_f & rect) -> void
noexcept

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]

auto xtd::drawing::region::complement ( const xtd::drawing::region & region) -> void
noexcept

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.

◆ equals() [1/3]

auto xtd::drawing::region::equals ( const xtd::object & obj) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/3]

auto xtd::drawing::region::equals ( const region & other) const -> bool
nodiscardoverridenoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ get_hash_code()

auto xtd::drawing::region::get_hash_code ( ) const -> xtd::usize
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ exclude() [1/4]

auto xtd::drawing::region::exclude ( const xtd::drawing::drawing_2d::graphics_path & path) -> void
noexcept

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]

auto xtd::drawing::region::exclude ( const xtd::drawing::rectangle & rect) -> void
noexcept

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]

auto xtd::drawing::region::exclude ( const xtd::drawing::rectangle_f & rect) -> void
noexcept

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

◆ exclude() [4/4]

auto xtd::drawing::region::exclude ( const xtd::drawing::region & region) -> void
noexcept

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.

◆ get_bounds() [1/2]

auto xtd::drawing::region::get_bounds ( ) const -> xtd::drawing::rectangle_f
nodiscardnoexcept

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]

auto xtd::drawing::region::get_bounds ( const xtd::drawing::graphics & g) const -> xtd::drawing::rectangle_f
nodiscardnoexcept

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()

auto xtd::drawing::region::get_hrgn ( const xtd::drawing::graphics & g) const -> xtd::intptr
nodiscardnoexcept

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.

◆ intersect() [1/4]

auto xtd::drawing::region::intersect ( const xtd::drawing::drawing_2d::graphics_path & path) -> void
noexcept

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]

auto xtd::drawing::region::intersect ( const xtd::drawing::rectangle & rect) -> void
noexcept

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]

auto xtd::drawing::region::intersect ( const xtd::drawing::rectangle_f & rect) -> void
noexcept

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]

auto xtd::drawing::region::intersect ( const xtd::drawing::region & region) -> void
noexcept

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]

auto xtd::drawing::region::is_empty ( ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_empty ( const xtd::drawing::graphics & g) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_infinite ( ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_infinite ( const xtd::drawing::graphics & g) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( const xtd::drawing::rectangle_f & rect,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( float x,
float y,
float width,
float height,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( const xtd::drawing::rectangle & rect,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( const xtd::drawing::rectangle_f & rect) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( float x,
float y,
float width,
float height ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( const xtd::drawing::rectangle & rect) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::int32 x,
xtd::int32 y,
xtd::int32 width,
xtd::int32 height ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::drawing::point_f pt,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( float x,
float y,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::drawing::point pt,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::int32 x,
xtd::int32 y,
const xtd::drawing::graphics & g ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::drawing::point_f pt) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( float x,
float y ) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::drawing::point pt) const -> bool
nodiscardnoexcept

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]

auto xtd::drawing::region::is_visible ( xtd::int32 x,
xtd::int32 y ) const -> bool
nodiscardnoexcept

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()

auto xtd::drawing::region::make_empty ( ) -> void

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

◆ make_infinite()

auto xtd::drawing::region::make_infinite ( ) -> void
noexcept

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

◆ make_union() [1/4]

auto xtd::drawing::region::make_union ( const xtd::drawing::drawing_2d::graphics_path & path) -> void
noexcept

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]

auto xtd::drawing::region::make_union ( const xtd::drawing::rectangle & rect) -> void
noexcept

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]

auto xtd::drawing::region::make_union ( const xtd::drawing::rectangle_f & rect) -> void
noexcept

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]

auto xtd::drawing::region::make_union ( const xtd::drawing::region & region) -> void
noexcept

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]

auto xtd::drawing::region::make_xor ( const xtd::drawing::drawing_2d::graphics_path & path) -> void
noexcept

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]

auto xtd::drawing::region::make_xor ( const xtd::drawing::rectangle & rect) -> void
noexcept

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]

auto xtd::drawing::region::make_xor ( const xtd::drawing::rectangle_f & rect) -> void
noexcept

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]

auto xtd::drawing::region::make_xor ( const xtd::drawing::region & region) -> void
noexcept

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()

auto xtd::drawing::region::release_hrgn ( xtd::intptr region_handle) -> void

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

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

◆ translate() [1/2]

auto xtd::drawing::region::translate ( xtd::int32 dx,
xtd::int32 dy ) -> void
noexcept

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]

auto xtd::drawing::region::translate ( float dx,
float dy ) -> void
noexcept

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.

◆ equals() [3/3]

auto xtd::drawing::region::equals ( const region & region,
const xtd::drawing::graphics & g ) -> bool
staticnodiscardnoexcept

Tests whether the specified Region is identical to this xtd::drawing::region on the specified drawing surface.

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

◆ from_hrgn()

auto xtd::drawing::region::from_hrgn ( xtd::intptr hrgn) -> xtd::drawing::region
staticnodiscard

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.

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