Class RectExensions
Helper method for the RECT struct
Inheritance
Namespace: Dapplo.Windows.Common.Extensions
Assembly: Dapplo.Windows.Common.dll
Syntax
public static class RectExensions : object
Methods
| Improve this Doc View SourceContains(RECT, POINT)
Test if this RECT contains the specified POINT
Declaration
public static bool Contains(this RECT rect, POINT point)
Parameters
Type | Name | Description |
---|---|---|
RECT | rect | |
POINT | point | POINT |
Returns
Type | Description |
---|---|
System.Boolean | true if it contains |
Contains(RECT, RECT)
True if small rectangle is entirely contained within the larger rectangle
Declaration
public static bool Contains(this RECT largerRectangle, RECT smallerRectangle)
Parameters
Type | Name | Description |
---|---|---|
RECT | largerRectangle | The larger rectangle |
RECT | smallerRectangle | The smaller rectangle |
Returns
Type | Description |
---|---|
System.Boolean | True if small rectangle is entirely contained within the larger rectangle, false otherwise |
HasOverlap(RECT, RECT)
Check that two rectangles overlap with each other
Declaration
public static bool HasOverlap(this RECT rect1, RECT rect2)
Parameters
Type | Name | Description |
---|---|---|
RECT | rect1 | The first rectangle |
RECT | rect2 | The second rectangle |
Returns
Type | Description |
---|---|
System.Boolean | The rectangles overlap |
IsAdjacent(RECT, RECT)
True if either rectangle is adjacent to the other rectangle
Declaration
public static AdjacentTo IsAdjacent(this RECT rect1, RECT rect2)
Parameters
Type | Name | Description |
---|---|---|
RECT | rect1 | The first rectangle |
RECT | rect2 | The second rectangle |
Returns
Type | Description |
---|---|
AdjacentTo | At least one rectangle is adjacent to the other rectangle |
IsDockedToLeftOf(RECT, RECT)
Test if a RECT is docked to the left of another RECT
Declaration
public static bool IsDockedToLeftOf(this RECT rect1, RECT rect2)
Parameters
Type | Name | Description |
---|---|---|
RECT | rect1 | RECT to test if it's docked |
RECT | rect2 | RECT rect to be docked to |
Returns
Type | Description |
---|---|
System.Boolean | bool with true if they are docked |
IsDockedToRightOf(RECT, RECT)
Test if a RECT is docked to the right of another RECT
Declaration
public static bool IsDockedToRightOf(this RECT rect1, RECT rect2)
Parameters
Type | Name | Description |
---|---|---|
RECT | rect1 | RECT to test if it's docked |
RECT | rect2 | RECT rect to be docked to |
Returns
Type | Description |
---|---|
System.Boolean | bool with true if they are docked |