Table of Contents

Struct DisplayBox

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

An axis-aligned box in drawing coordinates, as the extents of a display item or of a whole space.

public readonly struct DisplayBox
Inherited Members

Constructors

DisplayBox(double, double, double, double)

Makes a box from its corners.

Properties

Empty

Gets the box that holds nothing: its minimum is above its maximum, so the first point added makes it that point.

Height

Gets the height, nought for an empty box.

IsEmpty

Gets whether the box holds nothing.

MaxX

Gets the greatest X.

MaxY

Gets the greatest Y.

MinX

Gets the least X.

MinY

Gets the least Y.

Width

Gets the width, nought for an empty box.

Methods

Add(double, double)

Gets the box grown to hold a point.

Contains(DisplayBox)

Gets whether this box holds another wholly.

Contains(double, double)

Gets whether this box holds a point.

Inflate(double)

Gets the box grown by a margin on every side.

Intersects(DisplayBox)

Gets whether this box and another share a point.

Union(DisplayBox)

Gets the box grown to hold another box.