MIL_ID ContextGraId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_DOUBLE XCenter, | //in |
MIL_DOUBLE YCenter, | //in |
MIL_DOUBLE XRad, | //in |
MIL_DOUBLE YRad, | //in |
MIL_DOUBLE StartAngle, | //in |
MIL_DOUBLE EndAngle | //in |
This function draws a filled arc (sector) destructively (raster-based) in the specified image. Alternatively, this function can add a vector-based version of a filled arc to the specified 2D graphics list, allowing you to, for example, non-destructively annotate a display without pixelation effects upon scaling. Note that the arc is filled with the specified foreground color (MgraControl() or MgraControlList() with M_COLOR).
The filled arc is based on an ellipse centered at XCenter and YCenter, with radii XRad and YRad. The arc is the part of the ellipse between the start angle (StartAngle) and the end angle (EndAngle), both measured with respect to the X-axis. The arc inherits all the relevant settings of the specified 2D graphics context, such as the foreground color (MgraControl() with M_COLOR). If part of the filled arc falls outside of the specified area (image or display), that part is clipped off. The following image shows how the parameters are used to define the arc:
A filled arc's center position, radii, and angle values are interpreted with respect to the input coordinate system, specified using MgraControl() or MgraControlList() with M_INPUT_UNITS. An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup. Note that if you set your input coordinate system to M_WORLD and you pass MgraArcFill() an uncalibrated image or the drawing target of the 2D graphics list is uncalibrated, the function will generate an error.
To modify or inquire 2D graphics context settings, use MgraControl() or MgraInquire(). To modify or inquire 2D graphics list settings, use MgraControlList() or MgraInquireList().
To create an arc that is not filled, use MgraArc(). To create an arc that can be optionally filled and rotated, use MgraArcAngle().
Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same MIL 2D 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 2D graphics context. 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 identifier of a valid image buffer in which to draw the arc or the identifier of a valid 2D graphics list in which to add the arc. You must have allocated the image buffer or the 2D 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.
Specifies the X-coordinate of the center of the ellipse from which the arc is defined, in the input coordinate system.
Specifies the Y-coordinate of the center of the ellipse from which the arc is defined, in the input coordinate system.
Specifies the radius of the ellipse from which the arc is defined, along the X-axis of the input coordinate system. The radius must be greater than 0.
Specifies the radius of the ellipse from which the arc is defined, along the Y-axis of the input coordinate system. The radius must be greater than 0.
void MgraArcFillDouble
(MIL_ID ContextGraId,
MIL_ID
DstImageBufOrListGraId, MIL_DOUBLE XCenter,
MIL_DOUBLE YCenter,
MIL_DOUBLE XRad,
MIL_DOUBLE YRad,
MIL_DOUBLE StartAngle,
MIL_DOUBLE EndAngle)
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufOrListGraId See DstImageBufOrListGraId of the main function for a description. XCenter See XCenter of the main function for a description. YCenter See YCenter of the main function for a description. XRad See XRad of the main function for a description. YRad See YRad of the main function for a description. StartAngle See StartAngle of the main function for a description. EndAngle See EndAngle of the main function for a description. |
void MgraArcFillInt64
(MIL_ID ContextGraId,
MIL_ID
DstImageBufOrListGraId, MIL_INT64 XCenter,
MIL_INT64 YCenter,
MIL_INT64 XRad,
MIL_INT64 YRad,
MIL_DOUBLE StartAngle,
MIL_DOUBLE EndAngle)
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufOrListGraId See DstImageBufOrListGraId of the main function for a description. XCenter See XCenter of the main function for a description. YCenter See YCenter of the main function for a description. XRad See XRad of the main function for a description. YRad See YRad of the main function for a description. StartAngle See StartAngle of the main function for a description. EndAngle See EndAngle of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |