Rectangle Structure
Stores a set of four integers that represent the location and size of a rectangle.

Namespace: Aspose.PSD
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 23.4
Syntax
[SerializableAttribute]
public struct Rectangle

The Rectangle type exposes the following members.

Constructors
  NameDescription
Public methodRectangle(Point, Size)
Initializes a new instance of the Rectangle structure with the specified location and size.
Public methodRectangle(Int32, Int32, Int32, Int32)
Initializes a new instance of the Rectangle structure with the specified location and size.
Properties
  NameDescription
Public propertyBottom
Gets or sets the y-coordinate that is the sum of the Y and Height property values of this Rectangle structure.
Public propertyStatic memberEmpty
Gets a new instance of the Rectangle structure that has X, Y, Width and Height values set to zero.
Public propertyHeight
Gets or sets the height of this Rectangle structure.
Public propertyIsEmpty
Gets a value indicating whether all numeric properties of this Rectangle have values of zero.
Public propertyLeft
Gets or sets the x-coordinate of the left edge of this Rectangle structure.
Public propertyLocation
Gets or sets the coordinates of the upper-left corner of this Rectangle structure.
Public propertyRight
Gets or sets the x-coordinate that is the sum of X and Width property values of this Rectangle structure.
Public propertySize
Gets or sets the size of this Rectangle.
Public propertyTop
Gets or sets the y-coordinate of the top edge of this Rectangle structure.
Public propertyWidth
Gets or sets the width of this Rectangle structure.
Public propertyX
Gets or sets the x-coordinate of the upper-left corner of this Rectangle structure.
Public propertyY
Gets or sets the y-coordinate of the upper-left corner of this Rectangle structure.
Methods
  NameDescription
Public methodStatic memberCeiling
Converts the specified RectangleF structure to a Rectangle structure by rounding the RectangleF values to the next higher integer values.
Public methodContains(Point)
Determines if the specified point is contained within this Rectangle structure.
Public methodContains(Rectangle)
Determines if the rectangular region represented by rect is entirely contained within this Rectangle structure.
Public methodContains(Int32, Int32)
Determines if the specified point is contained within this Rectangle structure.
Public methodEquals
Tests whether obj is a Rectangle structure with the same location and size of this Rectangle structure.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberFromLeftTopRightBottom
Creates a Rectangle structure with the specified edge locations.
Public methodStatic memberFromPoints
Creates a new Rectangle from two points specified. Two verticales of the created Rectangle will be equal to the passed point1 and point2. These would be typically the opposite vertices.
Public methodGetHashCode
Returns the hash code for this Rectangle structure.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodInflate(Size)
Inflates this Rectangle by the specified amount.
Public methodInflate(Int32, Int32)
Inflates this Rectangle by the specified amount.
Public methodStatic memberInflate(Rectangle, Int32, Int32)
Creates and returns an inflated copy of the specified Rectangle structure. The copy is inflated by the specified amount. The original Rectangle structure remains unmodified.
Public methodIntersect(Rectangle)
Replaces this Rectangle with the intersection of itself and the specified Rectangle.
Public methodStatic memberIntersect(Rectangle, Rectangle)
Returns a third Rectangle structure that represents the intersection of two other Rectangle structures. If there is no intersection, an empty Rectangle is returned.
Public methodIntersectsWith
Determines if this rectangle intersects with rect.
Public methodNormalize
Normalizes the rectangle by making it's width and height positive, left less than right and top less than bottom.
Public methodOffset(Point)
Adjusts the location of this rectangle by the specified amount.
Public methodOffset(Int32, Int32)
Adjusts the location of this rectangle by the specified amount.
Public methodStatic memberRound
Converts the specified RectangleF to a Rectangle by rounding the RectangleF values to the nearest integer values.
Public methodToString
Converts the attributes of this Rectangle to a human-readable string.
(Overrides ValueTypeToString.)
Public methodStatic memberTruncate
Converts the specified RectangleF to a Rectangle by truncating the RectangleF values.
Public methodStatic memberUnion
Gets a Rectangle structure that contains the union of two Rectangle structures.
Operators
  NameDescription
Public operatorStatic memberEquality
Tests whether two Rectangle structures have equal location and size.
Public operatorStatic memberInequality
Tests whether two Rectangle structures differ in location or size.
See Also