Working with the DivisionUnit Object
Working with the DivisionUnit Object |
Description of working with the DivisionUnit object.
The DivisionUnit object represents a single structural element of a DivisionResult object. A DivisionUnit object may represent a drawing, a single recognition segment of handwriting, a line of handwriting, or a block of handwriting.
The InkDivisionType enumeration defines the structural element types that the layout analysis recognizes. In Automation, the DivisionUnit object is called IInkDivisionUnit.
The DivisionType property of the DivisionUnit object returns the structural element type that the DivisionUnit object is. The RecognitionString property of the DivisionUnit object returns the recognition text for handwriting elements, or null for drawing elements.
The Strokes property of the DivisionUnit object contains the subset of the strokes in the DivisionResult object that correspond to this element. Because handwriting elements exist for different levels of detail, the Strokes collections for different elements may overlap. Specifically, a recognition segment shares strokes with the line and block it is part of, and a line shares strokes with the block it is part of.
The Transform property of the DivisionUnit object returns a matrix for rotating the strokes of the element to horizontal. For paragraph and drawing elements the Transform property returns the identity matrix. A text recognizer performs much better on handwriting that is horizontally aligned than it does on handwriting that is not. In Automation, this is called the RotationTransform property, and it returns an InkTransform object which contains the transformation matrix. The RotationTransform property returns null for paragraph and drawing elements.
For more information about the DivisionResult object, see Working with the DivisionResult Object.