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

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
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inh...
Definition region.h:32
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define drawing_export_
Define shared library export.
Definition drawing_export.h: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.
Examples
circular_form.cpp.

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

intptr handle () const noexcept
 Gets the handle of the region.
 

Public Methods

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

Public Static Methods

static xtd::drawing::region from_hrgn (intptr hrgn)
 Initializes a new xtd::drawing::region from a handle to the specified existing GDI region.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Public Member Functions inherited from xtd::iequatable< region >
virtual bool equals (const region &) const noexcept=0
 Indicates wheth er the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

The documentation for this class was generated from the following file:
  • xtd.drawing/include/xtd/drawing/region.h