Table of Contents

Class TextElement

Namespace
LMKit.Document.Layout
Assembly
LM-Kit.NET.dll

Represents a textual element optionally associated with a bounding box. Suitable for layout-aware text extraction from OCR engines, documents, or other structured sources.

public sealed class TextElement : ILayoutElement, IBounds
Inheritance
TextElement
Implements
Inherited Members

Constructors

TextElement(string)

Initializes a new instance of the TextElement class with only the text content. Bounding box values will default to 0.

TextElement(string, Quadrilateral)

Initializes a new instance of the TextElement class with the specified text and an existing quadrilateral bounding box.

TextElement(string, Quadrilateral, int, double, double)

Initializes a new instance of the TextElement class with the specified text and an existing quadrilateral bounding box, then rotates that box by standardRotation degrees around the center of a page.

TextElement(string, double, double, double, double)

Initializes a new instance of the TextElement class with the specified text and bounding box coordinates.

TextElement(string, double, double, double, double, int, double, double)

Initializes a new instance of the TextElement class with the specified text and bounding box coordinates, then rotates that box by standardRotation degrees around the center of a page.

Properties

Bottom

Gets the vertical position of the bottom edge of the bounding box. If no bounding box is available, this value defaults to 0.

Bounds

Returns the bounding quadrilateral of this text element.

Height

Gets the height of the bounding box. If no bounding box is available, this value defaults to 0.

IsEmpty

Gets a value indicating whether this text element is empty, i.e. has no text content or a zero-area bounding box.

Left

Gets the horizontal position of the left edge of the bounding box. If no bounding box is available, this value defaults to 0.

Right

Gets the horizontal position of the right edge of the bounding box. If no bounding box is available, this value defaults to 0.

Text

Gets or sets the textual content of this element.

Top

Gets the vertical position of the top edge of the bounding box. If no bounding box is available, this value defaults to 0.

Width

Gets the width of the bounding box. If no bounding box is available, this value defaults to 0.

Methods

Clone()

Creates a deep copy of this TextElement instance.

Equals(object)
GetHashCode()
ToString()