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
stringThe textual content of the element.
left
doubleThe horizontal position of the bounding box.
top
doubleThe vertical position of the bounding box.
width
doubleThe width of the bounding box.
height
doubleThe 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
stringThe textual content of the element.
left
doubleThe horizontal position of the bounding box before rotation.
top
doubleThe vertical position of the bounding box before rotation.
width
doubleThe width of the bounding box before rotation.
height
doubleThe height of the bounding box before rotation.
standardRotation
intThe clockwise rotation angle, in degrees, to apply to the bounding box relative to the page center.
pageWidth
doubleThe width of the page or canvas, used for rotation calculations.
pageHeight
doubleThe 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
stringThe textual content of the element.