Constructor OcrUnderline
- Namespace
- LMKit.Extraction.Ocr
- Assembly
- LM-Kit.NET.dll
OcrUnderline(Quadrilateral, double, int, int, int, Trait, double?, double?)
Initializes a new instance of the OcrUnderline class.
public OcrUnderline(Quadrilateral bounds, double thickness, int lineIndex, int firstWordIndex = -1, int lastWordIndex = -1, OcrUnderline.Trait traits = Trait.None, double? gapAbove = null, double? gapBelow = null)
Parameters
boundsQuadrilateralThe box of the stroke, in the frame of the result's text elements.
thicknessdoubleThe thickness of the stroke, in the units of
bounds.lineIndexintThe reading-order index of the text line above the underline, or -1.
firstWordIndexintThe index of the first word the underline runs under, or -1.
lastWordIndexintThe index of the last word the underline runs under, or -1.
traitsOcrUnderline.TraitWhat the page around the stroke says about it.
gapAbovedouble?The blank space to the nearest ink above, or null.
gapBelowdouble?The blank space to the nearest ink below, or null.
OcrUnderline(double, double, double, double, double, int, int, int, Trait, double?, double?)
Initializes a new instance of the OcrUnderline class from the edges of its box, the form the JSON carries; a deskewed box is restored axis-aligned, as the text elements' boxes are.
[JsonConstructor]
public OcrUnderline(double left, double top, double width, double height, double thickness, int lineIndex, int firstWordIndex = -1, int lastWordIndex = -1, OcrUnderline.Trait traits = Trait.None, double? gapAbove = null, double? gapBelow = null)
Parameters
leftdoubleThe left edge of the box.
topdoubleThe top edge of the box.
widthdoubleThe width of the box.
heightdoubleThe height of the box.
thicknessdoubleThe thickness of the stroke.
lineIndexintThe reading-order index of the text line above the underline, or -1.
firstWordIndexintThe index of the first word the underline runs under, or -1.
lastWordIndexintThe index of the last word the underline runs under, or -1.
traitsOcrUnderline.TraitWhat the page around the stroke says about it.
gapAbovedouble?The blank space to the nearest ink above, or null.
gapBelowdouble?The blank space to the nearest ink below, or null.