Nicomsoft OCR: Developer's Guide


Blk_GetWordFontColor


Syntax

C++:int Blk_GetWordFontColor(HBLK BlkObj, int LineIndex, int WordIndex)
C#:int Blk_GetWordFontColor(int BlkObj, int LineIndex, int WordIndex)
Visual Basic:Function Blk_GetWordFontColor(ByVal BlkObj As Integer, ByVal LineIndex As Integer, ByVal WordIndex As Integer) As Integer
Java:int Blk_GetWordFontColor(HBLK BlkObj, int LineIndex, int WordIndex)
Delphi:function Blk_GetWordFontColor(BlkObj:HBLK; LineIndex:integer; WordIndex:integer):integer


Description

Retrieves the text font color for the specified word in the block after performing OCR with the Img_OCR function. Use the Blk_GetLineCnt function to get the total number of text lines in the block. Use the Blk_GetWordCnt function to get the total number of words in the specified line.


Parameters

BlkObj [IN] – the Block object. You can also specify the Image object if you want to work with the global list of text lines for the entire image.
LineIndex [IN] – the index of the text line to retrieve; 0 – the first line.
WordIndex [IN] – the index of the word in the specified text line to retrieve; 0 – the first word.


Return value

If success, the RGB color (B | (G << 8) | (R << 16)); otherwise, an error code.


Remarks

The OCRSTEP_OCR step must be executed before calling this function.


Example

See the sample code for the Img_GetBlockCnt function.