xtd 0.2.0
Loading...
Searching...
No Matches
region.hpp
1#pragma once
3#if !defined(__XTD_DRAWING_NATIVE_LIBRARY__)
4#error "Do not include this file: Internal use only"
5#endif
7
8#include <cstdint>
9#include <xtd/static>
10#include <xtd/types>
11#include <xtd/drawing_native_export.hpp>
12
14namespace xtd {
16 namespace drawing {
18 class region;
20
23 namespace native {
31 class drawing_native_export_ region final static_ {
33 protected:
35
40 static intptr create();
41
49 static intptr create_from_rect(float x, float y, float width, float height);
50
56
60 static void destroy(intptr handle);
61
66 static void complement(intptr handle, intptr region);
67
72 static void exclude(intptr handle, intptr region);
73
78 static intptr from_hrgn(intptr hrgn);
79
87 static void get_bounds(intptr handle, float& x, float& y, float& width, float& height);
88
94 static intptr get_hrgn(intptr handle, intptr grpahics);
95
100 static void intersect(intptr handle, intptr region);
101
106 static bool is_empty(intptr handle);
112 static bool is_empty(intptr handle, intptr grpahics);
113
118 static bool is_infinite(intptr handle);
124 static bool is_infinite(intptr handle, intptr grpahics);
125
132 static bool is_visible(intptr handle, float x, float y);
140 static bool is_visible(intptr handle, float x, float y, intptr grpahics);
149 static bool is_visible(intptr handle, float x, float y, float width, float height);
159 static bool is_visible(intptr handle, float x, float y, float width, float height, intptr grpahics);
160
164 static void make_empty(intptr handle);
165
170 static void make_union(intptr handle, intptr region);
171
176 static void make_xor(intptr handle, intptr region);
177
181 static void release_hrgn(intptr region_handle);
182
188 static void translate(intptr handle, float dx, float dy);
190 };
191 }
192 }
193}
Contains region native API.
Definition region.hpp:31
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 graph...
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 bool is_empty(intptr handle, intptr grpahics)
Tests whether the region has an empty interior on the specified drawing surface.
static void destroy(intptr handle)
Destroys the region.
static bool is_infinite(intptr handle)
Tests whether the region has an infinite interior.
static intptr get_hrgn(intptr handle, intptr grpahics)
Returns a Windows handle to the region in the specified graphics context.
static void translate(intptr handle, float dx, float dy)
Offsets the coordinates of the region by the specified amount.
static void exclude(intptr handle, intptr region)
Updates the region to contain only the portion of its interior that does not intersect with the speci...
static intptr create_from_rect(float x, float y, float width, float height)
Creates a region from the specified rectangle.
static void intersect(intptr handle, intptr region)
Updates the region to the intersection of itself with the specified 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 r...
static bool is_empty(intptr handle)
Tests whether the region has an empty interior.
static void make_xor(intptr handle, intptr region)
Updates the region to the union minus the intersection of itself with the specified region.
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 graph...
static void make_empty(intptr handle)
Initializes the region to an empty interior.
static intptr create()
Creates a region with an infinite interior.
static void make_union(intptr handle, intptr region)
Updates the region to the union of itself and the specified region.
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, 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 wh...
static intptr create_from_graphics_path(intptr path)
Creates a region with the specified graphics path.
static intptr from_hrgn(intptr hrgn)
Creates a region from a handle to the specified existing GDI region.
static void release_hrgn(intptr region_handle)
Releases the handle of the region.
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inh...
Definition region.hpp:32
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10