A rectangular area in a 2D coordinate space.
Hierarchy
System.Object
System.ValueType
WebSupergoo.ImageGlue8.Rectangle
Notes

This class is sealed. It cannot be derived from.

Methods
Method Description
Rectangle Constructs a rectangle given a top-left location, width and height.
S» Ceiling Returns a new Rectangle copied from the supplied RectangleF. Coordinates will be rounded to the nearest larger integer.
Contains Determines if the point is within the rectangle.
Equals Determines whether the specified object is a Rectangle, value identical to this one.
S» FitIn Fits this rectangle inside a containing rectangle, preserving aspect ratio.

The size is determined by the fit type. You can choose to map the width of this rectangle into the width of the destination, or the height into the height of the destination, or both. The rectangle will be centered inside the containing rectangle.

S» FromLTRB Creates a rectangle using the boundaries of the object.
S» FromPoints Returns the smallest rectangle which contains all the supplied points. If no points are supplied an exception will be raised.
GetHashCode Obtains a hash code for the Rectangle.
Inflate Enlarges the rectangle horizontally and vertically.
Intersect Changes this rectangle to represent the intersection of itself and a supplied rectangle.
Offset Translates the rectangle horizontally and vertically.
S» Round Returns a new Rectangle copied from the supplied RectangleF. Coordinates will be rounded to the nearest integer.
Scale Scales the rectangle.
ToString Converts the rectangle to a string representation such as 'X=10, Y=20, Width=100, Height=200'.
S» Truncate Returns a new Rectangle copied from the supplied RectangleF. Coordinates will be truncated to integers.
S» Tween Find a rectangle between two other rectangles using linear interpolation.
S» Union Changes this rectangle to represent the union of itself and a supplied rectangle. The union is the smallest rectangle that contains both rectangles.
Operators
Operator Description
Addition Translate the Rectangle by adding a vector Point to it.
Division Scale the coordinates of the Rectangle by a dividing factor.
Equality Compares two Rectangle instances for equality.
Implicit (RectangleF) Converts this object to another type via an implicit cast.
Inequality Compares two Rectangle instances for inequality.
Multiply Scale the coordinates of the Rectangle by a multiplying factor.
Subtraction Translate the Rectangle by subtracting a vector Point from it.
Properties
Property Description
Bottom The y coordinate of the bottom side of the rectangle.
BottomLeft Gets the bottom left corner of the rectangle.
BottomRight Gets the bottom right corner of the rectangle.
Corners Gets the four corners of the rectangle in order top-left, top-right, bottom-left, bottom-right.
Height The vertical dimension of the rectangle.
IsEmpty Whether the rectangle is zero.
Left The x coordinate of the left side of the rectangle.
Location The top-left position of the rectangle.
Right The x coordinate of the right side of the rectangle.
Size The dimensions of the rectangle.
Top The y coordinate of the top side of the rectangle.
TopLeft Gets the top left corner of the rectangle.
TopRight Gets the top right corner of the rectangle.
Width The horizontal dimension of the rectangle.
X The x coordinate of the left side of the rectangle.
Y The y coordinate of the top side of the rectangle.
Fields
Field Description
Empty The empty rectangle.
Example

None.