Table: | For specifying the scan line |
MIL_ID ContextGraId, | //in |
MIL_ID ResultCodeId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT ResultIndex, | //in |
MIL_INT ScanIndex, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features of results, obtained from an McodeRead(), McodeGrade(), McodeWrite(), or McodeDetect() operation, in the specified 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:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the identifier of the code read, grade, or detect result buffer from which to extract features to draw. The code result buffer must have been previously allocated on the required system using McodeAllocResult() with M_DEFAULT or M_CODE_DETECT_RESULT.
Specifies the identifier of the destination image buffer or 2D graphics list in which to draw 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. For the M_DRAW_REFLECTANCE_PROFILE and M_DRAW_SCAN_PROFILES drawing operations, determine the required image buffer width using McodeGetResult() with M_SCAN_REFLECTANCE_PROFILE_LENGTH. For best results for a M_DRAW_REFLECTANCE_PROFILE drawing operation, the image buffer must have a height of at least 256.
If you specify a 2D graphics list, the 2D graphics list must have been previously allocated using MgraAllocList().
By drawing into the display's overlay buffer or associating the 2D graphics list with the display, you can also annotate an image non-destructively.
Specifies the type of drawing operation to perform. Drawing operations can be added together to draw multiple features at a time. For example, to draw both the result occurrence's position and code symbol as it was read using McodeRead(), set the Operation parameter to M_DRAW_POSITION + M_DRAW_CODE.
The following drawing operations are only available after performing an McodeRead() or McodeGrade() operation.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the specified code occurrence as it was read by McodeRead() or McodeGrade(). This drawing operation is not supported for GS1 Databar, MicroPDF417, and composite code types. (summarize)Draws the specified code occurrence as it was read by McodeRead() or McodeGrade(). (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the specified decoded scan line(s) that an McodeRead() or McodeGrade() operation used to read the specified code occurrence(s). The scan lines are drawn using their start and end points (McodeGetResult() with M_DECODED_SCANS_START... and M_DECODED_SCANS_END...). You can specify the scan line for which to draw results using ScanIndex. This drawing operation is available for linear and composite code types. For composite code types, only the scan lines in the 1D portion of the code occurrence(s) are drawn. (summarize)Draws the specified decoded scan line(s) that an McodeRead() or McodeGrade() operation used to read the specified code occurrence(s). (more details...) |
The following types of drawing operations are only available after performing an McodeRead(), McodeGrade(), McodeWrite() operation.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws a cross-like symbol at the mid-point of the code occurrence. Note that for a Data Matrix code occurrence, after an McodeRead() or McodeGrade() operation, the cross symbol is drawn in the middle of the top-left cell. For a composite code occurrence, the cross is drawn at the midpoint of the 1D part of the code. For a Maxicode code occurrence, the cross appears in the center of the bull's eye pattern. Regardless of the code type, the cross is drawn maintaining the angle of the occurrence. (summarize)Draws a cross-like symbol at the mid-point of the code occurrence. (more details...) |
The following types of drawing operations are only available after performing an McodeGrade() operation.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws a box around the specified code occurrence, including its extended area, as analyzed by the McodeGrade() operation. Note that this drawing operation is only available if M_EXTENDED_AREA_REFLECTANCE_CHECK was enabled for the McodeGrade() operation. To establish the dimensions of occurrence with its extended area, use McodeGetResult() with M_EXTENDED_AREA_TOP... and M_EXTENDED_AREA_BOTTOM.... This drawing operation is available for Aztec, Data Matrix, QR code, and Micro QR code types. (summarize)Draws a box around the specified code occurrence, including its extended area, as analyzed by the McodeGrade() operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the scan reflectance profile of the specified scan line(s) of the code occurrence, as analyzed by the McodeGrade() operation. You can specify the scan line for which to draw results using ScanIndex. The result is not scaled to the size of the destination image buffer. For best results, the image buffer must have a height of at least 256. (summarize)Draws the scan reflectance profile of the specified scan line(s) of the code occurrence, as analyzed by the McodeGrade() operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the specified scan line(s) analyzed in the code occurrence by the McodeGrade() operation. You can specify the scan line for which to draw results using ScanIndex. The drawn scan line(s) represents only the region(s) from which the results were successfully located. (summarize)Draws the specified scan line(s) analyzed in the code occurrence by the McodeGrade() operation. (more details...) |
You can use one or more of the following values in combination with each other or with the above-mentioned values, to specify a drawing operation that is available after an McodeRead(), McodeGrade(), McodeWrite(), or McodeDetect() operation.
Refer to individual values for usage details after specific code operations.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws a box around the code occurrence. This box is drawn according to the corner coordinates of the code occurrence. You can retrieve these coordinates using McodeGetResult() with M_BOTTOM... and M_TOP.... The box only contains the part of the code occurrence that was processed; for occurrences of 1D code types from an McodeRead() operation performed in low accuracy (McodeControl() with M_POSITION_ACCURACY set to M_LOW), this means that the box might not encompass the entire code occurrence. The box is drawn maintaining the angle and scale of the occurrence. When dealing with composite code occurrences (only supported by McodeRead(), McodeGrade(), and McodeWrite() operations), the box is drawn around the 1D component of the code occurrence. To draw the box around the 2D component of a code occurrence, combine M_DRAW_BOX with M_2D_COMPONENT. Note that after an McodeDetect() operation, you must use this value alone; it cannot be used in combination with any other value. (summarize)Draws a box around the code occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws a box around the specified code occurrence, including its quiet zone, as analyzed by the McodeRead(), McodeGrade(), or McodeWrite() operation. The box is drawn maintaining the angle and scale of the occurrence. To establish the dimensions of occurrence with its quiet zone, use McodeGetResult() with M_QUIET_ZONE_TOP... and M_QUIET_ZONE_BOTTOM.... The box only contains the part of the code occurrence that was processed; for occurrences of 1D code types from an McodeRead() operation performed in low accuracy (McodeControl() with M_POSITION_ACCURACY set to M_LOW), this means that the box might not encompass the entire code occurrence or might include white space. Note that this drawing operation is not available after an McodeDetect() operation. (summarize)Draws a box around the specified code occurrence, including its quiet zone, as analyzed by the McodeRead(), McodeGrade(), or McodeWrite() operation. (more details...) |
You can add one of the following values to the above-mentioned values to specify the component of a composite code occurrence for which to draw results.
These values are only available to draw results from an McodeGrade() operation.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the grading result for the 1D component (linear component) of a composite code occurrence. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Draws the grading result for the 2D component of a composite code occurrence. |
Specifies the code occurrence for which to draw results.
This parameter should be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Performs the specified operation for all code occurrences in the code result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the code occurrence in the code result buffer. See the Retrieving results section of Chapter 15: Codes for more information on code occurrence indices. (summarize)Specifies the index of the code occurrence in the code result buffer. (more details...) |
Specifies the scan line(s) for which to draw results.
Note that specifying a scan line is only applicable to drawing operations that draw results for specified scan lines (for example, M_DRAW_REFLECTANCE_PROFILE or M_DRAW_SCAN_PROFILES). For all other drawing operations, set this parameter to M_GENERAL. If specifying both a scan line-specific drawing operation and a general drawing operation (for example, M_DRAW_REFLECTANCE_PROFILE + M_DRAW_CODE), set this parameter to the scan line(s) for which to draw results instead of passing M_GENERAL.
This parameter should be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value. For a scan line-specific drawing operation, this value is the same as M_ALL. For a general drawing operation, this value is the same as M_GENERAL. (summarize)Specifies the default value. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to perform the scan line-specific drawing operation for all scan lines of the specified code occurrence(s). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to perform the drawing operation without specifying a scan line. Note that this value is not supported for the M_DRAW_REFLECTANCE_PROFILE and M_DRAW_SCAN_PROFILES drawing operations. (summarize)Specifies to perform the drawing operation without specifying a scan line. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the decoded scan line for which to perform the drawing operation, for the specified code occurrence. Note that this value cannot be used if ResultIndex is set to M_ALL or M_DEFAULT. (summarize)Specifies the index of the decoded scan line for which to perform the drawing operation, for the specified code occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the scan line for which to perform the drawing operation, for the specified code occurrence. Note that this value cannot be used if ResultIndex is set to M_ALL or M_DEFAULT. (summarize)Specifies the index of the scan line for which to perform the drawing operation, for the specified code occurrence. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milcode.lib. |
DLL | Requires mil.dll; milcode.dll. |