Class Rectangle
- Namespace
- LMKit.Extraction.Layout
- Assembly
- LM-Kit.NET.dll
Represents a rectangular bounding box defined by its left, top, right, and bottom edges. Provides convenience properties such as width, height, and midpoint coordinates, as well as methods for creating, cloning, translating, and scaling rectangles.
public sealed class Rectangle
- Inheritance
-
Rectangle
- Inherited Members
Properties
- Bottom
Gets the vertical position of the bottom edge of the rectangle.
- Height
Gets the height of the rectangle, calculated as
Bottom - Top
.
- Left
Gets the horizontal position of the left edge of the rectangle.
- MiddleX
Gets the horizontal midpoint of the rectangle.
- MiddleY
Gets the vertical midpoint of the rectangle.
- Right
Gets the horizontal position of the right edge of the rectangle.
- Top
Gets the vertical position of the top edge of the rectangle.
- Width
Gets the width of the rectangle, calculated as
Right - Left
.
Methods
- Clone()
Creates a deep copy of the rectangle.
- FromCoordinates(double, double, double, double)
Creates a new rectangle from its edge coordinates.
- FromSize(double, double, double, double)
Creates a new rectangle from a starting coordinate and size.
- Scale(double, double)
Scales the rectangle by the specified factors along the X and Y axes.
- Translate(double, double)
Translates the rectangle by the specified amounts along the X and Y axes.