Table of Contents

Namespace LMKit.Graphics.Geometry

Classes

Point

Represents a 2D point with X and Y coordinates. Immutable: all operations return new instances. Provides methods and operators for creation, translation, scaling, comparison, distance calculation, and tuple deconstruction.

Quadrilateral

Represents a quadrilateral (four-corner polygon) defined by four points. Immutable: all operations return new instances. Suitable for rotated rectangles, skewed boxes, or arbitrary four-cornered regions such as OCR bounding boxes. Provides geometric operations, transformations, and access to an axis-aligned bounding box (AABB).

Rectangle

Represents an axis-aligned rectangle defined by its left, top, right, and bottom edges. Immutable: all operations return new instances. Provides convenience properties such as width, height, and midpoint coordinates, as well as methods for creation, translation, scaling, containment checks, intersection, union, inflation/deflation (uniform and asymmetric), and normalization.

Interfaces

IBounds

Defines the contract for an axis-aligned bounding box. Provides access to the left, top, right, and bottom edges of a rectangular region.

IPoint

Defines the contract for a two-dimensional point in Cartesian coordinates. Provides access to the horizontal (X) and vertical (Y) coordinates.

ISize

Defines the contract for a two-dimensional size. Provides access to the Width and Height dimensions.