MIL_ID ContextGraId, | //in |
MIL_ID ContextOrResultStrId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT Index, | //in |
const void *CharListPtr, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features of the String Reader context or String Reader results in the destination image buffer or specified graphics list.
After each drawing operation, the optimal image size that was needed for that operation is recorded in the String Reader context or result buffer (depending on what is passed) and can be inquired using MstrInquire with M_DRAW_LAST_SIZE_X and M_DRAW_LAST_SIZE_Y. When M_NULL is passed as the destination image (DstImageBufOrListGraId parameter), this function only records the optional image size for the specified drawing operation; that is, the drawing operation is not performed. This can be useful if, for example, you only want to get the optimal image buffer size for the drawing operation.
Specifies the identifier of the graphics context to use when drawing. This parameter must be set to one of the following values:
For specifying the graphics
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL graphics context identifier |
Specifies a valid graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the String Reader context or String Reader result buffer from which to extract the features to draw. The String Reader context or result buffer must have been previously allocated on the system using MstrAlloc() or MstrAllocResult(), respectively.
Specifies the identifier of the destination image buffer or graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the graphics list with the display, you can also annotate an image non-destructively.
When ContextOrResultStrId is set to the identifier of a String Reader context and the Operation parameter is set to M_DRAW_CHAR, this parameter can be set to any valid MIL image buffer, a graphics list, or M_NULL. In any other case, this parameter can be set to the indentifier of an image buffer or a graphics list.
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.
When this parameter is set to M_NULL, this function only records the optional image size for the specified drawing operation; that is, the drawing operation is not performed.
Specifies the type of operation to perform.
The following Operation parameter value can only be set for a String Reader context.
For a font-based context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_CHAR |
Draws a character representation of the font in the destination image. (more details...) |
The following Operation parameter values can only be set for a String Reader result buffer. Note that these values can be added together to draw multiple features at once.
Unless otherwise specified, you can use these operations if results were obtained using either a font-based or a fontless context.
When applicable, features are always drawn at the location read in the target with the correct angle, scale, and aspect ratio.
For a result buffer
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_MIL_FONT_STRING |
Draws all the characters of the String Reader result(s) under the bottom left corner of the string bounding box (M_DRAW_STRING_BOX). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING |
Draws all the characters of String Reader result(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_BOX |
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 String Reader result(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_CHAR_POSITION |
Draws a cross at the center of gravity of each string's character. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_STRING_CONTOUR |
Draws the contour of all the characters of the result(s) of the string(s) read. (more details...) |
Specifies the index of the font feature or result feature to draw.
Set this parameter to one of the following values:
For specifying the font or
result
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Draws the default features for either fonts or results. (more details...) |
||||||||||||||||||||||||||||||||||||||
Draws the features of a specific font. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the font. Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Draws the features of all results. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Draws the features of a specific result. |
Specifies an explicit list of valid characters to draw, at the specified position. This is an optional, null-terminated string.
This parameter is not needed when drawing results and should be set to M_NULL.
Characters will be drawn in the order given in the CharListPtr parameter. To draw the characters on multiple lines, a space character must be inserted to separate the strings included in the null-terminated terminated string.
The array of strings must be of the right type for the encoding scheme selected (MstrControl() with M_ENCODING). At preprocessing time, each character in an explicit character list must exist in at least one of the fonts of the constraint.
Specifies where in the destination image buffer to draw.
For a String Reader result, this parameter must be set to M_DEFAULT.
For a String Reader context, set this parameter to one of the following values:
For specifying where to draw
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Draws characters from the center of the top-left pixel of the destination image buffer; or, if drawing in a graphics list, from the center of the top-left pixel of the image used at the time of annotation. |
||||||||||||||||||||||||||||||||||||||
M_ORIGINAL |
Draws characters at the same offset as their original position in the definition image, for user-defined characters (set using MstrEditFont() with M_USER_DEFINED). (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milstr.lib. |
DLL | Requires mil.dll; milstr.dll. |