Extension methods for the Rect.
More...
Extension methods for the Rect.
◆ Contains() [1/2]
static bool Contains |
( |
this Rect |
rect, |
|
|
WinPoint |
pt |
|
) |
| |
|
static |
Check if a point is located inside this Rect.
- Parameters
-
rect | This rectangle. |
pt | point to be checked |
- Returns
- true if pt is inside this Rect, false otherwise.
◆ Contains() [2/2]
static bool Contains |
( |
this RectD |
rect, |
|
|
WinPoint |
pt |
|
) |
| |
|
static |
Check if a point is located inside this Rect.
- Parameters
-
rect | This rectangle. |
pt | point to be checked |
- Returns
- true if pt is inside this Rect, false otherwise.
◆ GetRectPos()
static RectPos GetRectPos |
( |
this WinRect |
rect, |
|
|
WinPoint |
pt, |
|
|
double |
borderMargin = 5.0 |
|
) |
| |
|
static |
Check the location in/out of this Rect.
- Parameters
-
rect | This rectangle. |
pt | Point to be checked. |
borderMargin | Margin to be considered as border thickness. |
- Returns
- The location.
◆ ToCvbRectD()
static RectD ToCvbRectD |
( |
this WinRect |
rect | ) |
|
|
static |
Converts the given rect into a RectD.
- Parameters
-
rect | Rectangle to be converted. |
- Returns
- New
RectD
object.
◆ ToWindowsRect() [1/2]
static WinRect ToWindowsRect |
( |
this Rect |
rect | ) |
|
|
static |
Creates a System.Windows.Rect from this rectangle.
- Parameters
-
- Returns
- New System.Windows.Rect.
◆ ToWindowsRect() [2/2]
static WinRect ToWindowsRect |
( |
this RectD |
rect | ) |
|
|
static |
Creates a System.Windows.Rect from this rectangle.
- Parameters
-
- Returns
- New System.Windows.Rect.