Rect Structure

A rectangular area in a 2D coordinate space.

 

Namespace:  WebSupergoo.WordGlue4
Assembly:  WordGlue4 (in WordGlue4.dll) Version: 4.1.0.0 (4.1.0.0)
Syntax
public struct Rect : IComparable<Rect>

The Rect type exposes the following members.

Constructors
  Name Description
Public method Rect(Point, Size)
Construct the Rect given a top-left Point and a Size extending down and right.
Public method Rect(Double, Double, Double, Double)
Construct the Rect given a horizontal and vertical location, width and height.
Top
Properties
  Name Description
Public property Bottom
The bottom border of the Rect.
Public property BottomLeft
The Point at the bottom left of the Rect.
Public property BottomRight
The Point at the bottom right of the Rect.
Public property Height
The vertical dimensions of the Rect.
Public property IsEmpty
Whether the rectangle has a positive area
Public property Left
The left border of the Rect.
Public property Position
The top-left position of the Rect.
Public property Right
The right border of the Rect.
Public property Size
The dimensions of the Rect.
Public property Top
The top border of the Rect.
Public property TopLeft
The Point at the top left of the Rect.
Public property TopRight
The Point at the top right of the Rect.
Public property Width
The horizontal dimensions of the Rect.
Public property X
The left border of the Rect.
Public property Y
The top border of the Rect.
Top
Methods
  Name Description
Public method CompareTo
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object
Public methodStatic member Contains(Rect, Point)
Works out if a rect contains a point. A point at the top or left of the rectangle is counted as contained but one at the bottom or right is not. Thus an empty rectangle never contains any points.
Public methodStatic member Contains(Rect, Rect)
Works out if one rect (a) completely contains another (b). Identical rectangles are counted as contained.
Public methodStatic member Contains(Rect, Point, Double)
Works out if a rect contains a point. A point at the top or left of the rectangle is counted as contained but one at the bottom or right is not. Thus an empty rectangle never contains any points.
Public method Equals(Object)
Compare for equality.
(Overrides ValueTypeEquals(Object).)
Public method Equals(Rect, Double)
Compare for equality.
Public method GetHashCode
Obtain a hash code for the Rect.
(Overrides ValueTypeGetHashCode.)
Public methodStatic member Intersect
Find the intersection of two rectangles.
Public methodStatic member IntersectsWith
Determines if one rectangle intersects with another.
Public method Round
Round the dimensions of the rect to the nearest integer.
Public method ToString
Convert the Rect to a human readable string such as \'X=10; Y=20; W=100; H=200\'.
(Overrides ValueTypeToString.)
Public method ToString(IFormatProvider)
Convert the Rect to a human readable string such as \'X=10; Y=20; W=100; H=200\'.
Public methodStatic member Union
Determine the union of two supplied rectangles. The union is the smallest rectangle that contains both rectangles.
Top
Operators
  Name Description
Public operatorStatic member Addition(Rect, Point)
Translate the Rect by adding a vector Point to it.
Public operatorStatic member Addition(Rect, Size)
Translate the Rect by adding a vector Size to it.
Public operatorStatic member Division
Scale the coordinates of the rect by a dividing factor.
Public operatorStatic member Equality
Compare two Rects for equality.
Public operatorStatic member Inequality
Compare two Rects for inequality.
Public operatorStatic member Multiply
Scale the coordinates of the rect by a multiplying factor.
Public operatorStatic member Subtraction
Translate the Rect by subtracting a vector Point from it.
Top
See Also