Table of Contents

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

bounds Quadrilateral

The box of the stroke, in the frame of the result's text elements.

thickness double

The thickness of the stroke, in the units of bounds.

lineIndex int

The reading-order index of the text line above the underline, or -1.

firstWordIndex int

The index of the first word the underline runs under, or -1.

lastWordIndex int

The index of the last word the underline runs under, or -1.

traits OcrUnderline.Trait

What the page around the stroke says about it.

gapAbove double?

The blank space to the nearest ink above, or null.

gapBelow double?

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

left double

The left edge of the box.

top double

The top edge of the box.

width double

The width of the box.

height double

The height of the box.

thickness double

The thickness of the stroke.

lineIndex int

The reading-order index of the text line above the underline, or -1.

firstWordIndex int

The index of the first word the underline runs under, or -1.

lastWordIndex int

The index of the last word the underline runs under, or -1.

traits OcrUnderline.Trait

What the page around the stroke says about it.

gapAbove double?

The blank space to the nearest ink above, or null.

gapBelow double?

The blank space to the nearest ink below, or null.

Share