Table of Contents

Constructor TextElement

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

TextElement(string, double, 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, double angle = 0)

Parameters

text string

The textual content of the element.

left double

The X coordinate of the left edge of the bounding box (document units, e.g., points).

top double

The Y coordinate of the top edge of the bounding box (document units).

width double

The width of the bounding box (document units).

height double

The height of the bounding box (document units).

angle double

Intrinsic text orientation in degrees, clockwise, relative to unrotated page axes. Default is 0.

TextElement(string, Quadrilateral, double)

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

public TextElement(string text, Quadrilateral box, double angle = 0)

Parameters

text string

The textual content of the element.

box Quadrilateral

The bounding quadrilateral in document coordinates.

angle double

Intrinsic text orientation in degrees, clockwise. Default is 0.

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.

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 X coordinate of the left edge of the bounding box (document units).

top double

The Y coordinate of the top edge of the bounding box (document units).

width double

The width of the bounding box (document units).

height double

The height of the bounding box (document units).

standardRotation int

A standard page rotation (0, 90, 180, 270) applied to the box about the page center.

pageWidth double

The page width used as the rotation frame (document units).

pageHeight double

The page height used as the rotation frame (document units).

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.

public TextElement(string text, Quadrilateral box, int standardRotation, double pageWidth, double pageHeight)

Parameters

text string

The textual content of the element.

box Quadrilateral

The bounding quadrilateral in document coordinates.

standardRotation int

A standard page rotation (0, 90, 180, 270) applied to the box about the page center.

pageWidth double

The page width used as the rotation frame (document units).

pageHeight double

The page height used as the rotation frame (document units).

TextElement(string)

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

public TextElement(string text)

Parameters

text string

The textual content of the element.