MIL_ID ContextGraId, | //in |
MIL_ID FontContextOrResultOcrId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT Index, | //in |
MIL_CONST_TEXT_PTR CharList, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features of the OCR fonts or OCR results in the destination image buffer or 2D graphics list.
Specifies the identifier of the 2D graphics context to use when drawing. This parameter must be set to one of the following values:
For specifying the 2D graphics context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default 2D graphics context of the current MIL application is used. Note that there is a different default 2D graphics context for each thread. (summarize)Specifies that the default 2D graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL 2D graphics context identifier |
Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the OCR Font context or result buffer from which to extract the features to draw. The OCR Font context or result buffer must have been previously allocated using MocrAllocFont() or MocrAllocResult().
Specifies the identifier of the destination image buffer or 2D graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The 2D graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the 2D graphics list with the display, you can also annotate an image non-destructively.
If specifying an image buffer, it must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the type of operation to perform.
The possible Operation parameter values for a OCR Font context are:
For specifying the type of operation to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_CHAR |
Draws a character representation of the font in the destination image buffer. Characters are drawn from left to right, and top to bottom. On each line, as many characters as possible will be drawn where the size of each character is the Cell size X. For more information see MocrInquire() with M_CHAR_CELL_SIZE_X. The buffer height must be at least the character Cell size Y multiplied by the number of lines necessary to hold all the characters. For more details see MocrInquire() with M_CHAR_CELL_SIZE_Y. This operation cannot draw in a 2D graphics list. (summarize)Draws a character representation of the font in the destination image buffer. (more details...) |
The possible Operation parameter values for an OCR result buffer are as follows. These values can be added together to draw multiple features at once.
For an OCR Font context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_BOX |
Draws a box around the string that is read in the target. Note that the bounding box of the string is the bounding box of all the string's characters bounding box, including the draw margin. (summarize)Draws a box around the string that is read in the target. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_CHAR_BOX |
Draws all the character boxes of the result(s) of the string(s) read. The character boxes of the strings are drawn at the location read in the target with the correct angle, scale and aspect ratio. The character box drawn is the bounding box of the character plus the draw margin. (summarize)Draws all the character boxes of the result(s) of the string(s) read. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_CHAR_POSITION |
Draws a cross at the center of the bounding box of each string's character. Note that the angle, scale, and aspect ratio of the character are taken into account. (summarize)Draws a cross at the center of the bounding box of each string's character. (more details...) |
Specifies a string containing a list of valid characters to draw when drawing an OCR font. To draw all the characters in the font or to draw results, this parameter should be set to M_NULL.
For specifying the string
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
MIL_TEXT("CharList") 1 |
Specifies that, when drawing an OCR font, this parameter can be a null-terminated string specifying a list of valid characters to draw. Characters will be drawn in the specified order. This string must be null-terminated. (summarize)Specifies that, when drawing an OCR font, this parameter can be a null-terminated string specifying a list of valid characters to draw. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Header | Include mil.h. |
Library | Use mil.lib; milocr.lib. |
DLL | Requires mil.dll; milocr.dll. |