MIL_ID ContextGraId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_DOUBLE XStart, | //in |
MIL_DOUBLE YStart, | //in |
MIL_DOUBLE XEnd, | //in |
MIL_DOUBLE YEnd | //in |
This function draws a line destructively (raster-based) in the specified image. Alternatively, this function can add a vector-based version of the line to the specified graphics list, allowing you to, for example, non-destructively annotate a display without pixelation effects upon scaling.
The line is based on a start point (XStart, YStart) and an end point (XEnd, YEnd). The line inherits all the relevant settings of the specified graphics context, such as the foreground color (see MgraAlloc() for default context settings). If part of the line falls outside of the specified area (image or display), that part is clipped off.
To modify or inquire graphics context settings, use MgraControl() or MgraInquire(). To modify or inquire graphics list settings, use MgraControlList() or MgraInquireList().
A line's coordinates are interpreted with respect to the input coordinate system, specified using MgraControl() or MgraControlList() with M_INPUT_UNITS. Note that if you set your input coordinate system to M_WORLD and you pass MgraLine() an uncalibrated image, the function will generate an error.
To create multiple lines, a polyline, or a polygon, use MgraLines().
Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same MIL graphics list (DstImageBufOrListGraId) without using an M_MUTEX object, as long as all the other parameters of the concurrent calls do not also share data.
Specifies the identifier of the graphics context. 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 identifier of a valid image buffer in which to draw the line or the identifier of a valid graphics list in which to add the line. You must have allocated the image buffer or the graphics list using MbufAlloc...() or MgraAllocList(), respectively.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
void MgraLineDouble
(MIL_ID ContextGraId,
MIL_ID
DstImageBufOrListGraId, MIL_DOUBLE XStart,
MIL_DOUBLE YStart,
MIL_DOUBLE XEnd,
MIL_DOUBLE YEnd)
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufOrListGraId See DstImageBufOrListGraId of the main function for a description. XStart See XStart of the main function for a description. YStart See YStart of the main function for a description. XEnd See XEnd of the main function for a description. YEnd See YEnd of the main function for a description. |
void MgraLineInt64
(MIL_ID ContextGraId,
MIL_ID
DstImageBufOrListGraId, MIL_INT64 XStart,
MIL_INT64 YStart,
MIL_INT64 XEnd,
MIL_INT64 YEnd)
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufOrListGraId See DstImageBufOrListGraId of the main function for a description. XStart See XStart of the main function for a description. YStart See YStart of the main function for a description. XEnd See XEnd of the main function for a description. YEnd See YEnd of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |