ClassRectExtensions
Methods related to the Rect class.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public static class RectExtensions
Inheritance: objectRectExtensions
Properties
RotateTransform
Simple RotateTransform.
Declaration
public static RotateTransform RotateTransform { get; set; }
Property Value
Methods
AroundPoint(Point, Point, double)
Around the point.
BottomLeft(Rect)
Returns the bottom-left point of the rectangle.
BottomLeft(Rect, Point, double, Point)
Returns the rotated bottom left point.
Declaration
public static Point BottomLeft(this Rect rect, Point transformationOrigin, double angle, Point pointOffset = default)
Parameters
rect
The rect.
transformationOrigin
The transform origin.
angle
The angle.
pointOffset
The point offset.
Returns
BottomLeft(Rect, double, Point, Point)
Returns the bottom left point.
Declaration
public static Point BottomLeft(this Rect rect, double angle, Point rotationOffset = default, Point pointOffset = default)
Parameters
rect
The rectangle.
angle
The angle.
rotationOffset
The rotation offset.
pointOffset
The point offset.
Returns
BottomRight(Rect)
Returns the bottom-right corner of the rectangle.
BottomRight(Rect, Point, double, Point)
Returns the rotated bottom right point.
Declaration
public static Point BottomRight(this Rect rect, Point transformationOrigin, double angle, Point pointOffset = default)
Parameters
rect
The rect.
transformationOrigin
The transform origin.
angle
The angle.
pointOffset
The point offset.
Returns
BottomRight(Rect, double, Point, Point)
Returns the bottoms right point.
Declaration
public static Point BottomRight(this Rect rect, double angle, Point rotationOffset = default, Point pointOffset = default)
Parameters
rect
The rectangle.
angle
The angle.
rotationOffset
The rotation offset.
pointOffset
The point offset.
Returns
Center(Rect)
Returns the center of the specified rectangle.
Center(Rect, Point, double)
Returns the rotated center point.
Center(Rect, double, Point)
Returns the rotated center point.
CenterBottom(Rect)
Returns the bottom center point.
CenterBottom(Rect, double, Point)
Centers the bottom.
CenterLeft(Rect)
Centers the left.
CenterLeft(Rect, double, Point)
Returns the rotated left center point.
CenterRight(Rect)
Centers the right.
CenterRight(Rect, double, Point)
Centers the right.
CenterTop(Rect)
Centers the top.
CenterTop(Rect, Point, double, Point)
Returns the rotated top center point.
CenterTop(Rect, double, Point, Point)
Returns the rotated top center point.
Declaration
public static Point CenterTop(this Rect rect, double angle, Point rotationOffset = default, Point pointOffset = default)
Parameters
rect
The rectangle.
angle
The angle.
rotationOffset
The rotation offset.
pointOffset
The point offset.
Returns
CenterX(Rect)
Returns the X coordinate of the centers.
CenterY(Rect)
Returns the Y coordinate of the center.
Contains(Rect, Point, Point, double)
Determines whether [contains] [the specified rectangle].
Declaration
public static bool Contains(this Rect rect, Point point, Point origin, double angle)
Parameters
rect
The rectangle.
point
The point.
origin
The transformation origin.
angle
The angle.
Returns
True if [contains] [the specified rect]; otherwise, false.
Contains(Rect, Point, double)
Determines whether [contains] [the specified rect].
Contains(Rect, Rect)
Determines whether the specified rect1 contains the rect2 parameter.
InflateRect(Rect, Size)
Inflates the specified rectangle.
InflateRect(Rect, double)
Inflates the given rectangle with the specified amount.
InflateRect(Rect, double, double)
Inflates the given rectangle with the specified amount.
InflateRect(Rect, double, double, double, double)
Inflates the specified rectangle.
IntersectionPoint(Rect, Point, Point)
Calculate the intersection point between an ellipse and a line segment.
IntersectsLine(Rect, IList)
Returns whether the polyline intersects the rectangle.
IntersectsLineAtIndex(Rect, IList)
Returns the index in the list at which the given points intersects the polyline.
IntersectsLineSegment(Rect, Point, Point, ref Point)
Intersects the line segment.
IntersectsWith(Rect, Point, Rect, double)
Determines whether the start bounds intersect with the given rectangle.
IntersectsWith(Rect, Rect)
Returns whether the given rectangle intersects the current one.
IntersectsWith(Rect, Rect, double)
Intersects with.
IsBigger(Rect, Rect)
Determines whether the specified rectangle is bigger.
IsInBounds(Rect, Rect)
Gets whether the rectangle is fully in bounds of the hosting rectangle.
IsNotZero(Rect)
Determines whether the specified rect is zero - does not have size.
IsValidBounds(Rect)
Determines whether the bounds are valid.
OffsetRect(Rect, Vector)
Offsets the specified rectangle.
OffsetRect(Rect, double, double)
Offsets the current rectangle with the specified values.
Pivot(Rect, Point)
Calculates the pivot point of the specified rectangle.
RelativePoint(Rect, Point)
Gets the relative point against the rectangle by offset.
Rotate(Rect, Point, double)
Rotates the specified rectangle.
Rotate(Rect, double, Point)
Rotates the specified rectangle.
RotateRect(Rect, Point, double)
Rotates the specified rect.
RotateRect(Rect, double, Point)
Rotates the specified rectangle.
RotationPoint(Rect, double, Point)
Rotations the point.
Shrink(Rect, double, double, double, double)
Shrinks the specified rectangle.
ToSize(Rect)
Toes the size.
TopLeft(Rect)
Returns the top-left point of the rectangle.
TopLeft(Rect, Point, double, Point)
Returns the rotated top left point.
TopLeft(Rect, double, Point, Point)
Returns the top left point.
Declaration
public static Point TopLeft(this Rect rect, double angle, Point rotationOffset = default, Point pointOffset = default)
Parameters
rect
The rectangle.
angle
The angle.
rotationOffset
The rotation offset.
pointOffset
The point offset.
Returns
TopRight(Rect)
Returns the top-right point of the rectangle.
TopRight(Rect, Point, double, Point)
Returns the rotated top right point.
TopRight(Rect, double, Point, Point)
Returns the top right point.
Declaration
public static Point TopRight(this Rect rect, double angle, Point rotationOffset = default, Point pointOffset = default)
Parameters
rect
The rectangle.
angle
The angle.
rotationOffset
The rotation offset.
pointOffset
The point offset.
Returns