CVB.Net 15.0
RectExtensions Class Reference

Extension methods for the Rect. More...

Static Public Member Functions

static WinRect ToWindowsRect (this Rect rect)
 Creates a System.Windows.Rect from this rectangle.
 
static WinRect ToWindowsRect (this RectD rect)
 Creates a System.Windows.Rect from this rectangle.
 
static RectD ToCvbRectD (this WinRect rect)
 Converts the given rect into a RectD.
 
static bool Contains (this Rect rect, WinPoint pt)
 Check if a point is located inside this Rect.
 
static bool Contains (this RectD rect, WinPoint pt)
 Check if a point is located inside this Rect.
 
static RectPos GetRectPos (this WinRect rect, WinPoint pt, double borderMargin=5.0)
 Check the location in/out of this Rect.
 

Detailed Description

Extension methods for the Rect.

Member Function Documentation

◆ Contains() [1/2]

static bool Contains ( this Rect rect,
WinPoint pt )
static

Check if a point is located inside this Rect.

Parameters
rectThis rectangle.
ptpoint 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
rectThis rectangle.
ptpoint 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
rectThis rectangle.
ptPoint to be checked.
borderMarginMargin 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
rectRectangle 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
rectThis rectangle.
Returns
New System.Windows.Rect.

◆ ToWindowsRect() [2/2]

static WinRect ToWindowsRect ( this RectD rect)
static

Creates a System.Windows.Rect from this rectangle.

Parameters
rectThis rectangle.
Returns
New System.Windows.Rect.