xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::native::region Class Referencefinal
Inheritance diagram for xtd::drawing::native::region:
xtd::static_object

Definition

Contains region native API.

Namespace
xtd::drawing::native
Library
xtd.drawing.native
Warning
Internal use only

Protected Static Methods

static intptr create ()
 Creates a region with an infinite interior.
 
static intptr create_from_rect (float x, float y, float width, float height)
 Creates a region from the specified rectangle.
 
static intptr create_from_graphics_path (intptr path)
 Creates a region with the specified graphics path.
 
static void destroy (intptr handle)
 Destroys the region.
 
static void complement (intptr handle, intptr region)
 Updates thie region to contain the portion of the specified region that does not intersect with the region.
 
static void exclude (intptr handle, intptr region)
 Updates the region to contain only the portion of its interior that does not intersect with the specified region.
 
static intptr from_hrgn (intptr hrgn)
 Creates a region from a handle to the specified existing GDI region.
 
static void get_bounds (intptr handle, float &x, float &y, float &width, float &height)
 Gets a rectangle that represents a rectangle that bounds in pixels the region.
 
static intptr get_hrgn (intptr handle, intptr grpahics)
 Returns a Windows handle to the region in the specified graphics context.
 
static void intersect (intptr handle, intptr region)
 Updates the region to the intersection of itself with the specified region.
 
static bool is_empty (intptr handle)
 Tests whether the region has an empty interior.
 
static bool is_empty (intptr handle, intptr grpahics)
 Tests whether the region has an empty interior on the specified drawing surface.
 
static bool is_infinite (intptr handle)
 Tests whether the region has an infinite interior.
 
static bool is_infinite (intptr handle, intptr grpahics)
 Tests whether the region has an infinite interior on the specified drawing surface.
 
static bool is_visible (intptr handle, float x, float y)
 Tests whether the specified point is contained within the region when drawn using the specified graphics.
 
static bool is_visible (intptr handle, float x, float y, intptr grpahics)
 Tests whether the specified point is contained within the region when drawn using the specified graphics.
 
static bool is_visible (intptr handle, float x, float y, float width, float height)
 Tests whether any portion of the specified rectangle is contained within the region.
 
static bool is_visible (intptr handle, float x, float y, float width, float height, intptr grpahics)
 Tests whether any portion of the specified rectangle is contained within this xtd::drawing::region when drawn using the specified xtd::drawing::graphics.
 
static void make_empty (intptr handle)
 Initializes the region to an empty interior.
 
static void make_union (intptr handle, intptr region)
 Updates the region to the union of itself and the specified region.
 
static void make_xor (intptr handle, intptr region)
 Updates the region to the union minus the intersection of itself with the specified region.
 
static void release_hrgn (intptr region_handle)
 Releases the handle of the region.
 
static void translate (intptr handle, float dx, float dy)
 Offsets the coordinates of the region by the specified amount.
 

Member Function Documentation

◆ create()

static intptr xtd::drawing::native::region::create ( )
staticprotected

Creates a region with an infinite interior.

Returns
The created region handle.
Warning
Internal use only

◆ create_from_rect()

static intptr xtd::drawing::native::region::create_from_rect ( float  x,
float  y,
float  width,
float  height 
)
staticprotected

Creates a region from the specified rectangle.

Parameters
xA x-coordinate of rectangle that defines the interior of the region.
yA y-coordinate of rectangle that defines the interior of the region.
widthA width of rectangle that defines the interior of the region.
heightA height of rectangle that defines the interior of the region.
Returns
The created region handle.
Warning
Internal use only

◆ create_from_graphics_path()

static intptr xtd::drawing::native::region::create_from_graphics_path ( intptr  path)
staticprotected

Creates a region with the specified graphics path.

Parameters
pathA graphics path handle that defines the region.
Returns
The created region handle.
Warning
Internal use only

◆ destroy()

static void xtd::drawing::native::region::destroy ( intptr  handle)
staticprotected

Destroys the region.

Parameters
handleThe region handle to destroy.
Warning
Internal use only

◆ complement()

static void xtd::drawing::native::region::complement ( intptr  handle,
intptr  region 
)
staticprotected

Updates thie region to contain the portion of the specified region that does not intersect with the region.

Parameters
handleThe region handle.
regionThe region handle to complement the region.
Warning
Internal use only

◆ exclude()

static void xtd::drawing::native::region::exclude ( intptr  handle,
intptr  region 
)
staticprotected

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

Parameters
handleThe region handle.
regionThe region handle to exclude from the region.
Warning
Internal use only

◆ from_hrgn()

static intptr xtd::drawing::native::region::from_hrgn ( intptr  hrgn)
staticprotected

Creates a region from a handle to the specified existing GDI region.

Parameters
hrgnA handle to an existing region.
Returns
The created region handle.
Warning
Internal use only

◆ get_bounds()

static void xtd::drawing::native::region::get_bounds ( intptr  handle,
float &  x,
float &  y,
float &  width,
float &  height 
)
staticprotected

Gets a rectangle that represents a rectangle that bounds in pixels the region.

Parameters
handleThe region handle.
xThe x-coordinate of rectangle that represents the bounding rectangle in pixels for the region.
yThe y-coordinate of rectangle that represents the bounding rectangle in pixels for the region.
widthThe width of rectangle that represents the bounding rectangle in pixels for the region.
heightThe height of rectangle that represents the bounding rectangle in pixels for the region.
Warning
Internal use only

◆ get_hrgn()

static intptr xtd::drawing::native::region::get_hrgn ( intptr  handle,
intptr  grpahics 
)
staticprotected

Returns a Windows handle to the region in the specified graphics context.

Parameters
handleThe region handle.
graphicsThe graphics handle on which the region is drawn.
Returns
A Windows handle to the region.
Warning
Internal use only

◆ intersect()

static void xtd::drawing::native::region::intersect ( intptr  handle,
intptr  region 
)
staticprotected

Updates the region to the intersection of itself with the specified region.

Parameters
handleThe region handle.
regionThe region handle to intersect with the region.
Warning
Internal use only

◆ is_empty() [1/2]

static bool xtd::drawing::native::region::is_empty ( intptr  handle)
staticprotected

Tests whether the region has an empty interior.

Parameters
handleThe region handle.
Returns
true if the interior of the region is empty; otherwise, false.
Warning
Internal use only

◆ is_empty() [2/2]

static bool xtd::drawing::native::region::is_empty ( intptr  handle,
intptr  grpahics 
)
staticprotected

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

Parameters
handleThe region handle.
graphicsA graphics handle that represents a drawing surface.
Returns
true if the interior of the region is empty when the transformation associated with graphics is applied; otherwise, false.
Warning
Internal use only

◆ is_infinite() [1/2]

static bool xtd::drawing::native::region::is_infinite ( intptr  handle)
staticprotected

Tests whether the region has an infinite interior.

Parameters
handleThe region handle.
Returns
true if the interior of the region is infinite; otherwise, false.
Warning
Internal use only

◆ is_infinite() [2/2]

static bool xtd::drawing::native::region::is_infinite ( intptr  handle,
intptr  grpahics 
)
staticprotected

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

Parameters
handleThe region handle.
graphicsA graphics handle that represents a drawing surface.
Returns
true if the interior of the region is infinite when the transformation associated with graphics is applied; otherwise, false.
Warning
Internal use only

◆ is_visible() [1/4]

static bool xtd::drawing::native::region::is_visible ( intptr  handle,
float  x,
float  y 
)
staticprotected

Tests whether the specified point is contained within the region when drawn using the specified graphics.

Parameters
handleThe region handle.
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 the region; otherwise, false.
Warning
Internal use only

◆ is_visible() [2/4]

static bool xtd::drawing::native::region::is_visible ( intptr  handle,
float  x,
float  y,
intptr  grpahics 
)
staticprotected

Tests whether the specified point is contained within the region when drawn using the specified graphics.

Parameters
handleThe region handle.
xThe x-coordinate of the point to test.
yThe y-coordinate of the point to test.
graphicsThe graphics handle that represents a draing surface.
Returns
true when the specified point is contained within the region; otherwise, false.
Warning
Internal use only

◆ is_visible() [3/4]

static bool xtd::drawing::native::region::is_visible ( intptr  handle,
float  x,
float  y,
float  width,
float  height 
)
staticprotected

Tests whether any portion of the specified rectangle is contained within the region.

Parameters
handleThe region handle.
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 the region; otherwise, false.
Warning
Internal use only

◆ is_visible() [4/4]

static bool xtd::drawing::native::region::is_visible ( intptr  handle,
float  x,
float  y,
float  width,
float  height,
intptr  grpahics 
)
staticprotected

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

Parameters
handleThe region handle.
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.
graphicsA graphics handle that represents a graphics context.
Returns
true when any portion of the specified rectangle is contained within the region; otherwise, false.
Warning
Internal use only

◆ make_empty()

static void xtd::drawing::native::region::make_empty ( intptr  handle)
staticprotected

Initializes the region to an empty interior.

Parameters
handleThe region handle.
Warning
Internal use only

◆ make_union()

static void xtd::drawing::native::region::make_union ( intptr  handle,
intptr  region 
)
staticprotected

Updates the region to the union of itself and the specified region.

Parameters
handleThe region handle.
regionThe region handle to unite with the region.
Warning
Internal use only

◆ make_xor()

static void xtd::drawing::native::region::make_xor ( intptr  handle,
intptr  region 
)
staticprotected

Updates the region to the union minus the intersection of itself with the specified region.

Parameters
handleThe region handle.
pathThe region handle to Xor with this xtd::drawing::region.
Warning
Internal use only

◆ release_hrgn()

static void xtd::drawing::native::region::release_hrgn ( intptr  region_handle)
staticprotected

Releases the handle of the region.

Parameters
region_handleThe handle to the region.
Warning
Internal use only

◆ translate()

static void xtd::drawing::native::region::translate ( intptr  handle,
float  dx,
float  dy 
)
staticprotected

Offsets the coordinates of the region by the specified amount.

Parameters
handleThe region handle.
dxThe amount to offset the region horizontally.
dyThe amount to offset the region vertically.
Warning
Internal use only

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