com.aspose.ocr

## Interface IRecognizedTextPartInfo

-     public interface IRecognizedTextPartInfo

  This interface presents information about each part of the recognized text.

  Part of text seems one part, that has all the same characteristics (style, color, etc.). It is divided by the words into parts, if have large text that has the same style.

  >      for (IRecognizedBlockInfo recognizedBlockInfo : ocr.getText().getPartsInfo())
  >      {
  >          String text = recognizedBlockInfo.getText();
  >          if (recognizedBlockInfo.getBold())
  >              text = String.format("<b>%s</b>", text);
  >          if (recognizedBlockInfo.getItalic())
  >              text = String.format("<i>%s</i>", text);
  >          System.out.println(text);
  >      }

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Color` | `getBackgroundColor()` Gets the color of background this part.
    `boolean` | `getBold()` Gets a value that indicates whether this part is bold.
    `Rectangle` | `getBox()` Gets the rectangular area where the text shown in the picture.
    `Rectangle[]` | `getCharactersBox()` Gets an array of rectangles.
    `float[]` | `getCharactersQuality()` Gets an array of values specified for some recognition of this character.
    `FontFamily` | `getFont()` Gets the font of this part.
    `float` | `getFontSize()` Gets the font size of this part.
    `boolean` | `getItalic()` Gets a value that indicates whether this part is italic.
    `String` | `getLanguage()` Gets the language of this part.
    `String` | `getText()` Gets the text of this part.
    `Color` | `getTextColor()` Gets a color of text this part.
    `boolean` | `getUnderline()` Gets a value that indicates whether this part is underline.

- - ### Method Detail

    - #### getBackgroundColor

          Color getBackgroundColor()

      Gets the color of background this part.
      Returns:
        the background color of this part.

    - #### getBold

          boolean getBold()

      Gets a value that indicates whether this part is bold.
      Returns:
        `true` if this part is bold.

    - #### getBox

          Rectangle getBox()

      Gets the rectangular area where the text shown in the picture. Coordinates starts with the upper left corner of the picture.
      Returns:
        the rectangular area where the text shown in the picture.

    - #### getCharactersBox

          Rectangle[] getCharactersBox()

      Gets an array of rectangles. Size of the array is equal to size of `getText()` (how many letters in part).

      Each rectangle indicates the area of character. Coordinates starts with the upper left corner of the picture.
      Returns:
        an array of rectangles.

    - #### getCharactersQuality

          float[] getCharactersQuality()

      Gets an array of values specified for some recognition of this character. Size of the array is equal to size of `getText()` (how many letters in part). Each array element can be from 0.0 to 1.0 inclusive. Value 0.0 means that the poorly recognized, 1.0 means that perfectly recognized.
      Returns:
        an array of values specified for some recognition of this character.

    - #### getFont

          FontFamily getFont()

      Gets the font of this part.
      Returns:
        the font of this part.

    - #### getFontSize

          float getFontSize()

      Gets the font size of this part.
      Returns:
        the font size of this part.

    - #### getItalic

          boolean getItalic()

      Gets a value that indicates whether this part is italic.
      Returns:
        `true` if this part is italic.

    - #### getLanguage

          String getLanguage()

      Gets the language of this part.
      Returns:
        the language

    - #### getText

          String getText()

      Gets the text of this part.
      Returns:
        the text of this part.

    - #### getTextColor

          Color getTextColor()

      Gets a color of text this part.
      Returns:
        the text color of this part.

    - #### getUnderline

          boolean getUnderline()

      Gets a value that indicates whether this part is underline.
      Returns:
        `true` if this part is underlined.

Copyright © 2014. All rights reserved.