Table of Contents

Constructor TextElement

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

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

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

[JsonConstructor]
public TextElement(string text, double left, double top, double width, double height)

Parameters

text string

The textual content of the element.

left double

The horizontal position of the bounding box.

top double

The vertical position of the bounding box.

width double

The width of the bounding box.

height double

The height of the bounding box.

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 of size pageWidth×pageHeight.

public TextElement(string text, double left, double top, double width, double height, int standardRotation, double pageWidth, double pageHeight)

Parameters

text string

The textual content of the element.

left double

The horizontal position of the bounding box before rotation.

top double

The vertical position of the bounding box before rotation.

width double

The width of the bounding box before rotation.

height double

The height of the bounding box before rotation.

standardRotation int

The clockwise rotation angle, in degrees, to apply to the bounding box relative to the page center.

pageWidth double

The width of the page or canvas, used for rotation calculations.

pageHeight double

The height of the page or canvas, used for rotation calculations.

TextElement(string)

Initializes a new instance of the TextElement class with only the text content. Use this constructor when position or layout information is not available or not applicable. Bounding box values will default to 0.

public TextElement(string text)

Parameters

text string

The textual content of the element.