CVB.Net 14.0
RectExtensions Class Reference

Extension methods for the Stemmer.Cvb.Rect. More...

Static Public Member Functions

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

Detailed Description

Extension methods for the Stemmer.Cvb.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.