RectHelper
RectHelper
RectHelper
RectHelper
Class
Definition
public : sealed class RectHelper : IRectHelperpublic sealed class RectHelper : IRectHelperPublic NotInheritable Class RectHelper Implements IRectHelper// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Rect is a Windows Runtime structure that represents a rectangle's dimensions with an origin.
RectHelper is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use members of Rect instead, because utility members are available directly on the structure due to .NET Framework runtime support. C++ code can only access the data values on Rect, for example Left. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on Rect are available in a static form on the RectHelper class.
Properties
Empty Empty Empty Empty
Methods
Contains(Rect, Point) Contains(Rect, Point) Contains(Rect, Point) Contains(Rect, Point)
Returns whether a given Point is within the bounds of a given Rect, for a shared coordinate reference. C# and Microsoft Visual Basic code should use Contains instead. C# and Microsoft Visual Basic code should use the = operator instead.
public : static PlatForm::Boolean Contains(Rect target, Point point)public static bool Contains(Rect target, Point point)Public Static Function Contains(target As Rect, point As Point) As bool// This API is not available in Javascript.
true if point is within the target bounds; otherwise, false.
Equals(Rect, Rect) Equals(Rect, Rect) Equals(Rect, Rect) Equals(Rect, Rect)
Provides comparison of the values of two Rect values. C# and Microsoft Visual Basic code should use the = operator instead.
public : static PlatForm::Boolean Equals(Rect target, Rect value)public static bool Equals(Rect target, Rect value)Public Static Function Equals(target As Rect, value As Rect) As bool// This API is not available in Javascript.
true if target and value hold equivalent values; otherwise, false.
- See Also
FromCoordinatesAndDimensions(Single, Single, Single, Single) FromCoordinatesAndDimensions(Single, Single, Single, Single) FromCoordinatesAndDimensions(Single, Single, Single, Single) FromCoordinatesAndDimensions(Single, Single, Single, Single)
Creates a new Rect value based on the element values of a Rect structure. C# and Microsoft Visual Basic code should use Rect(Double,Double,Double,Double) instead.
public : static Rect FromCoordinatesAndDimensions(float x, float y, float width, float height)public static Rect FromCoordinatesAndDimensions(Single x, Single y, Single width, Single height)Public Static Function FromCoordinatesAndDimensions(x As Single, y As Single, width As Single, height As Single) As Rect// This API is not available in Javascript.
- x
- float Single Single Single
The pixel value to set for X.
- y
- float Single Single Single
The pixel value to set for Y.
- width
- float Single Single Single
The pixel value to set for Width.
- height
- float Single Single Single
The pixel value to set for Height.
FromLocationAndSize(Point, Size) FromLocationAndSize(Point, Size) FromLocationAndSize(Point, Size) FromLocationAndSize(Point, Size)
Creates a new Rect value based on a Point that specifies the upper-left origin, and a Size that specifies the width and height. C# and Microsoft Visual Basic code should use Rect(Point,Size) instead.
public : static Rect FromLocationAndSize(Point location, Size size)public static Rect FromLocationAndSize(Point location, Size size)Public Static Function FromLocationAndSize(location As Point, size As Size) As Rect// This API is not available in Javascript.
FromPoints(Point, Point) FromPoints(Point, Point) FromPoints(Point, Point) FromPoints(Point, Point)
Creates a new Rect value based on two points. C# and Microsoft Visual Basic code should use Rect(Point,Point) instead.
public : static Rect FromPoints(Point point1, Point point2)public static Rect FromPoints(Point point1, Point point2)Public Static Function FromPoints(point1 As Point, point2 As Point) As Rect// This API is not available in Javascript.
GetBottom(Rect) GetBottom(Rect) GetBottom(Rect) GetBottom(Rect)
Gets a "Bottom" value for the specified Rect. So long as Height is positive, "Bottom" is evaluated as Y + Height. C# and Microsoft Visual Basic code should use Bottom instead.
public : static float GetBottom(Rect target)public static float GetBottom(Rect target)Public Static Function GetBottom(target As Rect) As float// This API is not available in Javascript.
The evaluated "Bottom" value.
GetIsEmpty(Rect) GetIsEmpty(Rect) GetIsEmpty(Rect) GetIsEmpty(Rect)
Returns whether a specified Rect is equivalent to an Empty Rect. C# and Microsoft Visual Basic code should use IsEmpty instead.
public : static PlatForm::Boolean GetIsEmpty(Rect target)public static bool GetIsEmpty(Rect target)Public Static Function GetIsEmpty(target As Rect) As bool// This API is not available in Javascript.
GetLeft(Rect) GetLeft(Rect) GetLeft(Rect) GetLeft(Rect)
Gets a "Left" value for the specified Rect. So long as Width is positive, "Left" is evaluated as X. C# and Microsoft Visual Basic code should use Left instead.
public : static float GetLeft(Rect target)public static float GetLeft(Rect target)Public Static Function GetLeft(target As Rect) As float// This API is not available in Javascript.
The evaluated "Left" value.
GetRight(Rect) GetRight(Rect) GetRight(Rect) GetRight(Rect)
Gets a "Right" value for the specified Rect. So long as Width is positive, "Right" is evaluated as X + Width. C# and Microsoft Visual Basic code should use Right instead.
public : static float GetRight(Rect target)public static float GetRight(Rect target)Public Static Function GetRight(target As Rect) As float// This API is not available in Javascript.
The evaluated "Right" value.
GetTop(Rect) GetTop(Rect) GetTop(Rect) GetTop(Rect)
Gets a "Top" value for the specified Rect. So long as Height is positive, "Top" is evaluated as Y. C# and Microsoft Visual Basic code should use Top instead.
public : static float GetTop(Rect target)public static float GetTop(Rect target)Public Static Function GetTop(target As Rect) As float// This API is not available in Javascript.
The evaluated "Top" value.
Intersect(Rect, Rect) Intersect(Rect, Rect) Intersect(Rect, Rect) Intersect(Rect, Rect)
Returns the areas of two specified Rect values that intersect, as a new Rect. C# and Microsoft Visual Basic code should use Intersect instead.
public : static Rect Intersect(Rect target, Rect rect)public static Rect Intersect(Rect target, Rect rect)Public Static Function Intersect(target As Rect, rect As Rect) As Rect// This API is not available in Javascript.
Union(Rect, Point) Union(Rect, Point) Union(Rect, Point) Union(Rect, Point)
Creates a rectangle that is exactly large enough to contain the a specified rectangle and a specified point. C# and Microsoft Visual Basic code should use Union(Point) instead.
public : static Rect Union(Rect target, Point point)public static Rect Union(Rect target, Point point)Public Static Function Union(target As Rect, point As Point) As Rect// This API is not available in Javascript.
A rectangle that is exactly large enough to contain the specified rectangle and point.
- See Also
Union(Rect, Rect) Union(Rect, Rect) Union(Rect, Rect) Union(Rect, Rect)
Creates a rectangle that is exactly large enough to contain the two specified rectangles. C# and Microsoft Visual Basic code should use Union(Rect) instead.
public : static Rect Union(Rect target, Rect rect)public static Rect Union(Rect target, Rect rect)Public Static Function Union(target As Rect, rect As Rect) As Rect// This API is not available in Javascript.
A rectangle that is exactly large enough to contain the two specified rectangles.
- See Also