Constructor TextElement
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
textstringThe textual content of the element.
leftdoubleThe X coordinate of the left edge of the bounding box (document units, e.g., points).
topdoubleThe Y coordinate of the top edge of the bounding box (document units).
widthdoubleThe width of the bounding box (document units).
heightdoubleThe height of the bounding box (document units).
angledoubleIntrinsic 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
textstringThe textual content of the element.
boxQuadrilateralThe bounding quadrilateral in document coordinates.
angledoubleIntrinsic 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
textstringThe textual content of the element.
leftdoubleThe X coordinate of the left edge of the bounding box (document units).
topdoubleThe Y coordinate of the top edge of the bounding box (document units).
widthdoubleThe width of the bounding box (document units).
heightdoubleThe height of the bounding box (document units).
standardRotationintA standard page rotation (0, 90, 180, 270) applied to the box about the page center.
pageWidthdoubleThe page width used as the rotation frame (document units).
pageHeightdoubleThe 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
textstringThe textual content of the element.
boxQuadrilateralThe bounding quadrilateral in document coordinates.
standardRotationintA standard page rotation (0, 90, 180, 270) applied to the box about the page center.
pageWidthdoubleThe page width used as the rotation frame (document units).
pageHeightdoubleThe 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
textstringThe textual content of the element.