Rectangle
Rectangle class
Represents a rectangle defined by its edges for cropping purposes.
public sealed class Rectangle : ValueObject
Constructors
| Name |
Description |
| Rectangle(int, int, int, int) |
Initializes a new instance of the Rectangle struct with specified edges. |
Properties
| Name |
Description |
| Bottom { get; } |
Gets the bottom edge of the rectangle. |
| Height { get; } |
Gets the height of the rectangle based on top and bottom edges. |
| Left { get; } |
Gets the left edge of the rectangle. |
| Right { get; } |
Gets the right edge of the rectangle. |
| Top { get; } |
Gets the top edge of the rectangle. |
| Width { get; } |
Gets the width of the rectangle based on left and right edges. |
Methods
| Name |
Description |
| Crop(int, int, int, int) |
Creates a cropped version of the current rectangle by removing specified margins. |
| override Equals(object) |
Determines whether two object instances are equal. |
| virtual Equals(ValueObject) |
Determines whether two object instances are equal. |
| override GetHashCode() |
Serves as the default hash function. |
| override ToString() |
Returns a string representation of the rectangle. |
See Also