MIL_ID ContextGraId, | //in |
MIL_ID ResultCodeId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT ResultIndex, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features of results, obtained from a code read or grading operation, in the specified destination image buffer or graphics list. Results are only available after calling McodeRead() or McodeGrade().
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 code result buffer from which to extract features to draw. The code result buffer must have been previously allocated on the required system using McodeAllocResult().
Specifies the identifier of the destination image buffer or graphics list in which to write specific features of results.
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. The image buffer must be an 8-bit, unsigned, 1-band image buffer, allocated using MbufAlloc...().
In general, the destination image buffer should be the same size as the image that you just read. When dealing with reflectance profiles (using M_DRAW_REFLECTANCE_PROFILE), determine the required width (using McodeGetResult() or McodeGetResultSingle() with M_SCAN_REFLECTANCE_PROFILE_LENGTH. For best results, the height of a scan reflectance profile buffer must be 256.
If you specify a graphics list, the graphics list must have been previously allocated using MgraAllocList().
By drawing into the display's overlay buffer or associating the graphics list with the display, you can also annotate an image non-destructively.
Specifies the type of operation to perform. Operations can be added together to draw multiple features at a time. For example, to draw both the result occurrence's position and a bounding box around the code, set the Operation parameter to M_DRAW_POSITION + M_DRAW_BOX.
The following types of operations are only available after a read operation, with McodeRead().
For specifying the type of operation
after a read operation
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_CODE + |
Draws the specified code as it was read by McodeRead(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION + |
Draws a cross-like symbol at the mid-point of the code. (more details...) |
The following operations are only available after a grading operation, with McodeGrade().
For specifying the type of operation
after a grading operation
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_EXTENDED_AREA + |
Draws a box around the specified code including its extended area, as analyzed by the grading operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_REFLECTANCE_PROFILE + |
Draws the scan reflectance profile of the code, as analyzed by the grading operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SCAN_PROFILES + |
Draws the scan profile of the code, as analyzed by the grading operation. (more details...) |
You can add one of the following values to the above-mentioned values to get the grading result of a composite code.
Composite code grading
results
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_2D_COMPONENT + |
Draws the grading result of the 2D component of the composite code. |
||||||||||||||||||||||||||||||||||||||
M_LINEAR_COMPONENT + |
Draws the grading result of the linear component of the composite code. |
You can use one or more of the following values in combination with each other or with the above-mentioned values, to specify an operation that is available after either a read or grading operation.
The following type of operations are only available after a read operation, with McodeRead(), or a grading operation, with McodeGrade().
For specifying an operation that is
available after either a read or grading operation
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_BOX |
Draws a box around the code occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_QUIET_ZONE |
Draws a box around the specified code including its quiet zone, as analyzed by the read or grading operation. (more details...) |
Specifies from which code occurrence or scan reflectance profile to get and draw results.
This parameter should be set to one of the following values:
For specifying the occurrence index of
the code result
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
M_ALL + |
Performs the specified operation for all code occurrences in the code result buffer. |
||||||||||||||||||||||||||||||||||||||
OccurrenceIndex + |
Specifies the index of the code occurrence in the code result buffer. (more details...) |
You can use the following value on its own, or add it to the above-mentioned values, to specify the scan reflectance profile index.
This macro can be used without specifying the index of the code occurrence only when there is only a single code occurrence in the result buffer, or to specify a scan reflectance profile of the first code occurrence.
To specify the scan reflectance profile
index
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies the scan reflectance profile for which to perform the specified operation. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
To specify the scan reflectance profile index. You can use any of the following values for any drawing operation, unless otherwise specified. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
Header | Include mil.h. |
Library | Use mil.lib; milcode.lib. |
DLL | Requires mil.dll; milcode.dll. |