Class RectExtensions
Methods related to the Rect class.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.WinControls.RadDiagram.dll
Syntax
public static class RectExtensions
Properties
RotateTransform
Simple RotateTransform.
Declaration
public static RotateTransform RotateTransform { get; set; }
Property Value
Methods
AroundPoint(Point, Point, Double)
Around the point.
Declaration
public static bool AroundPoint(this Point originPoint, Point point, double delta)
Parameters
Returns
System.
|
BottomLeft(Rect)
Returns the bottom-left point of the rectangle.
Declaration
public static Point BottomLeft(this Rect rect)
Parameters
Rect
rect
The current rectangle. |
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), Point pointOffset = default(Point))
Parameters
Rect
rect
The rectangle. |
System. The angle. |
Point
rotationOffset
The rotation offset. |
Point
pointOffset
The point offset. |
Returns
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(Point))
Parameters
Rect
rect
The rect. |
Point
transformationOrigin
The transform origin. |
System. The angle. |
Point
pointOffset
The point offset. |
Returns
BottomRight(Rect)
Returns the bottom-right corner of the rectangle.
Declaration
public static Point BottomRight(this Rect rect)
Parameters
Rect
rect
The current rectangle. |
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), Point pointOffset = default(Point))
Parameters
Rect
rect
The rectangle. |
System. The angle. |
Point
rotationOffset
The rotation offset. |
Point
pointOffset
The point offset. |
Returns
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(Point))
Parameters
Rect
rect
The rect. |
Point
transformationOrigin
The transform origin. |
System. The angle. |
Point
pointOffset
The point offset. |
Returns
Center(Rect)
Returns the center of the specified rectangle.
Declaration
public static Point Center(this Rect rectangle)
Parameters
Rect
rectangle
|
Returns
Center(Rect, Double, Point)
Returns the rotated center point.
Declaration
public static Point Center(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
Center(Rect, Point, Double)
Returns the rotated center point.
Declaration
public static Point Center(this Rect rect, Point transformationOrigin, double angle)
Parameters
Returns
CenterBottom(Rect)
Returns the bottom center point.
Declaration
public static Point CenterBottom(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
CenterBottom(Rect, Double, Point)
Centers the bottom.
Declaration
public static Point CenterBottom(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
CenterLeft(Rect)
Centers the left.
Declaration
public static Point CenterLeft(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
CenterLeft(Rect, Double, Point)
Returns the rotated left center point.
Declaration
public static Point CenterLeft(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
CenterRight(Rect)
Centers the right.
Declaration
public static Point CenterRight(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
CenterRight(Rect, Double, Point)
Centers the right.
Declaration
public static Point CenterRight(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
CenterTop(Rect)
Centers the top.
Declaration
public static Point CenterTop(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
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), Point pointOffset = default(Point))
Parameters
Rect
rect
The rectangle. |
System. The angle. |
Point
rotationOffset
The rotation offset. |
Point
pointOffset
The point offset. |
Returns
CenterTop(Rect, Point, Double, Point)
Returns the rotated top center point.
Declaration
public static Point CenterTop(this Rect rect, Point transformationOrigin, double angle, Point pointOffset = default(Point))
Parameters
Rect
rect
The rect. |
Point
transformationOrigin
The rotation origin. |
System. The angle. |
Point
pointOffset
The point offset. |
Returns
CenterX(Rect)
Returns the X coordinate of the centers.
Declaration
public static double CenterX(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
System.
|
CenterY(Rect)
Returns the Y coordinate of the center.
Declaration
public static double CenterY(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
System.
|
Contains(Rect, Point, Double)
Determines whether [contains] [the specified rect].
Declaration
public static bool Contains(this Rect rect, Point point, double angle)
Parameters
Returns
System.
|
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
rect
The rectangle. |
Point
point
The point. |
Point
origin
The transformation origin. |
System. The angle. |
Returns
System.
|
Contains(Rect, Rect)
Determines whether the specified rect1 contains the rect2 parameter.
Declaration
public static bool Contains(this Rect rect1, Rect rect2)
Parameters
Returns
System.
|
InflateRect(Rect, Double)
Inflates the given rectangle with the specified amount.
Declaration
public static Rect InflateRect(this Rect rect, double delta)
Parameters
Rect
rect
|
System.
|
Returns
InflateRect(Rect, Double, Double)
Inflates the given rectangle with the specified amount.
Declaration
public static Rect InflateRect(this Rect rect, double deltaX, double deltaY)
Parameters
Rect
rect
|
System.
|
System.
|
Returns
InflateRect(Rect, Double, Double, Double, Double)
Inflates the specified rectangle.
Declaration
public static Rect InflateRect(this Rect rect, double left, double top, double right, double bottom)
Parameters
Rect
rect
The rectangle. |
System. The left. |
System. The top. |
System. The right. |
System. The bottom. |
Returns
InflateRect(Rect, Size)
Inflates the specified rectangle.
Declaration
public static Rect InflateRect(this Rect rect, Size size)
Parameters
Returns
IntersectionPoint(Rect, Point, Point)
Calculate the intersection point between an ellipse and a line segment.
Declaration
public static Point IntersectionPoint(this Rect rectangle, Point point1, Point point2)
Parameters
Returns
IntersectsLine(Rect, IList)
Returns whether the polyline intersects the rectangle.
Declaration
public static bool IntersectsLine(this Rect rect, IList polyline)
Parameters
Rect
rect
The rectangle to test intersection with. |
System. The polyline which potentially intersects the rectangle. |
Returns
System.
|
IntersectsLineAtIndex(Rect, IList)
Returns the index in the list at which the given points intersects the polyline.
Declaration
public static int IntersectsLineAtIndex(this Rect rect, IList polyline)
Parameters
Rect
rect
The rectangle test point. |
System. The polyline. |
Returns
System.
|
IntersectsLineSegment(Rect, Point, Point, ref Point)
Intersects the line segment.
Declaration
public static bool IntersectsLineSegment(this Rect rect, Point lineStart, Point lineEnd, ref Point point)
Parameters
Returns
System.
|
IntersectsWith(Rect, Point, Rect, Double)
Determines whether the start bounds intersect with the given rectangle.
Declaration
public static bool IntersectsWith(this Rect startBounds, Point transformOrigin, Rect rect, double angle)
Parameters
Rect
startBounds
The start bounds. |
Point
transformOrigin
The transformation origin. |
Rect
rect
The rectangle. |
System. The angle. |
Returns
System.
|
IntersectsWith(Rect, Rect)
Returns whether the given rectangle intersects the current one.
Declaration
public static bool IntersectsWith(this Rect rect1, Rect rect2)
Parameters
Returns
System.
|
IntersectsWith(Rect, Rect, Double)
Intersects with.
Declaration
public static bool IntersectsWith(this Rect shapeBounds, Rect rect, double angle)
Parameters
Rect
shapeBounds
The shape bounds. |
Rect
rect
The rectangle to intersect with. |
System. The rotation angle of the shapeBounds. |
Returns
System.
|
IsBigger(Rect, Rect)
Determines whether the specified rectangle is bigger.
Declaration
public static bool IsBigger(this Rect rect, Rect targetRect)
Parameters
Returns
System.
|
IsInBounds(Rect, Rect)
Gets whether the rectangle is fully in bounds of the hosting rectangle.
Declaration
public static bool IsInBounds(this Rect rect, Rect hostingRect)
Parameters
Returns
System. Returns true if the rectangle is fully inside the bounds for the hosting rectangle. |
IsNotZero(Rect)
Determines whether the specified rect is zero - does not have size.
Declaration
public static bool IsNotZero(this Rect rect)
Parameters
Rect
rect
The rectangle. |
Returns
System.
|
IsValidBounds(Rect)
Determines whether the bounds are valid.
Declaration
public static bool IsValidBounds(this Rect bounds)
Parameters
Rect
bounds
The bounds. |
Returns
System.
|
OffsetRect(Rect, Double, Double)
Offsets the current rectangle with the specified values.
Declaration
public static Rect OffsetRect(this Rect rect, double x, double y)
Parameters
Rect
rect
The rectangle to offset. |
System. The horizontal offset. |
System. The vertical offset. |
Returns
OffsetRect(Rect, Vector)
Offsets the specified rectangle.
Declaration
public static Rect OffsetRect(this Rect rect, Vector offsetVector)
Parameters
Returns
Pivot(Rect, Point)
Calculates the pivot point of the specified rectangle.
Declaration
public static Point Pivot(this Rect rect, Point origin)
Parameters
Returns
RelativePoint(Rect, Point)
Gets the relative point against the rectangle by offset.
Declaration
public static Point RelativePoint(this Rect rect, Point offset)
Parameters
Returns
Rotate(Rect, Double, Point)
Rotates the specified rectangle.
Declaration
public static Rect Rotate(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
Rotate(Rect, Point, Double)
Rotates the specified rectangle.
Declaration
public static Point[] Rotate(this Rect rect, Point pivot, double angle)
Parameters
Returns
Point[]
|
RotateRect(Rect, Double, Point)
Rotates the specified rectangle.
Declaration
public static Rect RotateRect(this Rect rect, double angle, Point pivot)
Parameters
Returns
RotateRect(Rect, Point, Double)
Rotates the specified rect.
Declaration
public static Rect RotateRect(this Rect rect, Point origin, double angle)
Parameters
Returns
RotationPoint(Rect, Double, Point)
Rotations the point.
Declaration
public static Point RotationPoint(this Rect rect, double angle, Point offsetVector = default(Point))
Parameters
Returns
Shrink(Rect, Double, Double, Double, Double)
Shrinks the specified rectangle.
Declaration
public static Rect Shrink(this Rect rect, double left = 0, double top = 0, double right = 0, double bottom = 0)
Parameters
Rect
rect
The rectangle. |
System. The left. |
System. The top. |
System. The right. |
System. The bottom. |
Returns
TopLeft(Rect)
Returns the top-left point of the rectangle.
Declaration
public static Point TopLeft(this Rect rect)
Parameters
Rect
rect
The current rectangle. |
Returns
TopLeft(Rect, Double, Point, Point)
Returns the top left point.
Declaration
public static Point TopLeft(this Rect rect, double angle, Point rotationOffset = default(Point), Point pointOffset = default(Point))
Parameters
Rect
rect
The rectangle. |
System. The angle. |
Point
rotationOffset
The rotation offset. |
Point
pointOffset
The point offset. |
Returns
TopLeft(Rect, Point, Double, Point)
Returns the rotated top left point.
Declaration
public static Point TopLeft(this Rect rect, Point transformOrigin, double angle, Point pointOffset = default(Point))
Parameters
Rect
rect
The rect. |
Point
transformOrigin
The transform origin. |
System. The angle. |
Point
pointOffset
The point offset. |
Returns
TopRight(Rect)
Returns the top-right point of the rectangle.
Declaration
public static Point TopRight(this Rect rect)
Parameters
Rect
rect
The current rectangle. |
Returns
TopRight(Rect, Double, Point, Point)
Returns the top right point.
Declaration
public static Point TopRight(this Rect rect, double angle, Point rotationOffset = default(Point), Point pointOffset = default(Point))
Parameters
Rect
rect
The rectangle. |
System. The angle. |
Point
rotationOffset
The rotation offset. |
Point
pointOffset
The point offset. |
Returns
TopRight(Rect, Point, Double, Point)
Returns the rotated top right point.
Declaration
public static Point TopRight(this Rect rect, Point transformationOrigin, double angle, Point pointOffset = default(Point))
Parameters
Rect
rect
The rect. |
Point
transformationOrigin
The transform origin. |
System. The angle. |
Point
pointOffset
The point offset. |