skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Struct Rect

Inherited Members
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.WinControls.RadDiagram.dll

Syntax

public struct Rect : IFormattable

Constructors

Rect(Double, Double, Double, Double)

Declaration
public Rect(double x, double y, double width, double height)
Parameters
System.Double x

System.Double y

System.Double width

System.Double height

Rect(Rectangle)

Declaration
public Rect(Rectangle rect)
Parameters
System.Drawing.Rectangle rect

Rect(RectangleF)

Declaration
public Rect(RectangleF rect)
Parameters
System.Drawing.RectangleF rect

Rect(Point, Point)

Declaration
public Rect(Point point1, Point point2)
Parameters
Point point1

Point point2

Rect(Point, Size)

Declaration
public Rect(Point location, Size size)
Parameters
Point location

Size size

Rect(Point, Vector)

Declaration
public Rect(Point point, Vector vector)
Parameters
Point point

Vector vector

Rect(Size)

Declaration
public Rect(Size size)
Parameters
Size size

Properties

Bottom

Declaration
public double Bottom { get; }
Property Value
System.Double

BottomLeft

Declaration
public Point BottomLeft { get; }
Property Value
Point

BottomRight

Declaration
public Point BottomRight { get; }
Property Value
Point

Empty

Declaration
public static Rect Empty { get; }
Property Value
Rect

Height

Declaration
public double Height { get; set; }
Property Value
System.Double

IsEmpty

Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean

Left

Declaration
public double Left { get; }
Property Value
System.Double

Location

Declaration
public Point Location { get; set; }
Property Value
Point

Right

Declaration
public double Right { get; }
Property Value
System.Double

Size

Declaration
public Size Size { get; set; }
Property Value
Size

Top

Declaration
public double Top { get; }
Property Value
System.Double

TopLeft

Declaration
public Point TopLeft { get; }
Property Value
Point

TopRight

Declaration
public Point TopRight { get; }
Property Value
Point

Width

Declaration
public double Width { get; set; }
Property Value
System.Double

X

Declaration
public double X { get; set; }
Property Value
System.Double

Y

Declaration
public double Y { get; set; }
Property Value
System.Double

Methods

Contains(Double, Double)

Declaration
public bool Contains(double x, double y)
Parameters
System.Double x

System.Double y

Returns
System.Boolean

Contains(Point)

Declaration
public bool Contains(Point point)
Parameters
Point point

Returns
System.Boolean

Contains(Rect)

Declaration
public bool Contains(Rect rect)
Parameters
Rect rect

Returns
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object o)
Parameters
System.Object o

Returns
System.Boolean

Overrides
System.ValueType.Equals(System.Object)

Equals(Rect)

Declaration
public bool Equals(Rect value)
Parameters
Rect value

Returns
System.Boolean

Equals(Rect, Rect)

Declaration
public static bool Equals(Rect rect1, Rect rect2)
Parameters
Rect rect1

Rect rect2

Returns
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Overrides
System.ValueType.GetHashCode()

Inflate(Double, Double)

Declaration
public void Inflate(double width, double height)
Parameters
System.Double width

System.Double height

Inflate(Rect, Double, Double)

Declaration
public static Rect Inflate(Rect rect, double width, double height)
Parameters
Rect rect

System.Double width

System.Double height

Returns
Rect

Inflate(Rect, Size)

Declaration
public static Rect Inflate(Rect rect, Size size)
Parameters
Rect rect

Size size

Returns
Rect

Inflate(Size)

Declaration
public void Inflate(Size size)
Parameters
Size size

Intersect(Rect)

Declaration
public void Intersect(Rect rect)
Parameters
Rect rect

Intersect(Rect, Rect)

Declaration
public static Rect Intersect(Rect rect1, Rect rect2)
Parameters
Rect rect1

Rect rect2

Returns
Rect

IntersectsWith(Rect)

Declaration
public bool IntersectsWith(Rect rect)
Parameters
Rect rect

Returns
System.Boolean

Offset(Double, Double)

Declaration
public void Offset(double offsetX, double offsetY)
Parameters
System.Double offsetX

System.Double offsetY

Offset(Rect, Double, Double)

Declaration
public static Rect Offset(Rect rect, double offsetX, double offsetY)
Parameters
Rect rect

System.Double offsetX

System.Double offsetY

Returns
Rect

Offset(Rect, Vector)

Declaration
public static Rect Offset(Rect rect, Vector offsetVector)
Parameters
Rect rect

Vector offsetVector

Returns
Rect

Offset(Vector)

Declaration
public void Offset(Vector offsetVector)
Parameters
Vector offsetVector

Parse(String)

Declaration
public static Rect Parse(string source)
Parameters
System.String source

Returns
Rect

Scale(Double, Double)

Declaration
public void Scale(double scaleX, double scaleY)
Parameters
System.Double scaleX

System.Double scaleY

Union(Point)

Declaration
public void Union(Point point)
Parameters
Point point

Union(Rect)

Declaration
public void Union(Rect rect)
Parameters
Rect rect

Union(Rect, Point)

Declaration
public static Rect Union(Rect rect, Point point)
Parameters
Rect rect

Point point

Returns
Rect

Union(Rect, Rect)

Declaration
public static Rect Union(Rect rect1, Rect rect2)
Parameters
Rect rect1

Rect rect2

Returns
Rect

Operators

Equality(Rect, Rect)

Declaration
public static bool operator ==(Rect rect1, Rect rect2)
Parameters
Rect rect1

Rect rect2

Returns
System.Boolean

Implicit(Rect to Rectangle)

Declaration
public static implicit operator Rectangle(Rect p)
Parameters
Rect p

Returns
System.Drawing.Rectangle

Implicit(Rect to RectangleF)

Declaration
public static implicit operator RectangleF(Rect p)
Parameters
Rect p

Returns
System.Drawing.RectangleF

Inequality(Rect, Rect)

Declaration
public static bool operator !=(Rect rect1, Rect rect2)
Parameters
Rect rect1

Rect rect2

Returns
System.Boolean

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)

Declaration
string IFormattable.ToString(string format, IFormatProvider provider)
Parameters
System.String format

System.IFormatProvider provider

Returns
System.String

Implements
System.IFormattable.ToString(System.String, System.IFormatProvider)

Extension Methods

GraphExtensions.Offset(Rect, Double, Double)
GraphExtensions.Position(Rect)
RectExtensions.IsInBounds(Rect, Rect)
RectExtensions.IsValidBounds(Rect)
RectExtensions.IsBigger(Rect, Rect)
RectExtensions.Rotate(Rect, Double, Point)
RectExtensions.Rotate(Rect, Point, Double)
RectExtensions.RotateRect(Rect, Point, Double)
RectExtensions.RotateRect(Rect, Double, Point)
RectExtensions.TopLeft(Rect)
RectExtensions.TopRight(Rect)
RectExtensions.BottomRight(Rect)
RectExtensions.BottomLeft(Rect)
RectExtensions.CenterLeft(Rect)
RectExtensions.CenterTop(Rect)
RectExtensions.CenterRight(Rect)
RectExtensions.CenterBottom(Rect)
RectExtensions.Center(Rect)
RectExtensions.CenterX(Rect)
RectExtensions.CenterY(Rect)
RectExtensions.TopLeft(Rect, Double, Point, Point)
RectExtensions.TopLeft(Rect, Point, Double, Point)
RectExtensions.TopRight(Rect, Double, Point, Point)
RectExtensions.TopRight(Rect, Point, Double, Point)
RectExtensions.BottomRight(Rect, Double, Point, Point)
RectExtensions.BottomRight(Rect, Point, Double, Point)
RectExtensions.BottomLeft(Rect, Double, Point, Point)
RectExtensions.BottomLeft(Rect, Point, Double, Point)
RectExtensions.Center(Rect, Double, Point)
RectExtensions.Center(Rect, Point, Double)
RectExtensions.CenterLeft(Rect, Double, Point)
RectExtensions.CenterTop(Rect, Double, Point, Point)
RectExtensions.CenterTop(Rect, Point, Double, Point)
RectExtensions.Contains(Rect, Rect)
RectExtensions.CenterRight(Rect, Double, Point)
RectExtensions.CenterBottom(Rect, Double, Point)
RectExtensions.RotationPoint(Rect, Double, Point)
RectExtensions.RelativePoint(Rect, Point)
RectExtensions.Contains(Rect, Point, Point, Double)
RectExtensions.Contains(Rect, Point, Double)
RectExtensions.IntersectsWith(Rect, Rect, Double)
RectExtensions.IntersectsWith(Rect, Point, Rect, Double)
RectExtensions.IntersectsLine(Rect, IList)
RectExtensions.IntersectsLineAtIndex(Rect, IList)
RectExtensions.IntersectsWith(Rect, Rect)
RectExtensions.ToSize(Rect)
RectExtensions.OffsetRect(Rect, Vector)
RectExtensions.OffsetRect(Rect, Double, Double)
RectExtensions.InflateRect(Rect, Double)
RectExtensions.InflateRect(Rect, Double, Double)
RectExtensions.InflateRect(Rect, Size)
RectExtensions.InflateRect(Rect, Double, Double, Double, Double)
RectExtensions.Pivot(Rect, Point)
RectExtensions.Shrink(Rect, Double, Double, Double, Double)
RectExtensions.IntersectsLineSegment(Rect, Point, Point, ref Point)
RectExtensions.IntersectionPoint(Rect, Point, Point)
RectExtensions.IsNotZero(Rect)
Utils.GetEllipsePointAtAngle(Rect, Double)
Utils.FindIntersectionPoint(Rect, Double, Point, Point, GlidingStyle)
Utils.ApproximateEllipse(Rect, Double)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.