MgraAllocList
| Board | Supported |
|---|---|
| Host System | Yes |
| V4L2 | Yes |
| Clarity UHD | Yes |
| Concord PoE | No |
| GenTL | Yes |
| GevIQ | Yes |
| GigE Vision | Yes |
| Indio | No |
| Iris GTX | Yes |
| Radient eV-CL | Yes |
| Rapixo CL | Yes |
| Rapixo CoF | Yes |
| Rapixo CXP | Yes |
| USB3 Vision | Yes |
Allocate a 2D graphics list.
Syntax
AIL_ID MgraAllocList(
AIL_ID SysId, //in
AIL_INT64 ListGraType, //in
AIL_ID * ListGraIdPtr //out
)
Description
This function allocates a 2D graphics list, which holds graphics in vector (mathematical) form. Different 2D graphics lists can coexist; use their identifier to specify which to use or change.
The 2D graphics list can be used to annotate the display non-destructively, using MdispControl with M_ASSOCIATED_GRAPHIC_LIST_ID. Since graphics in a 2D graphics list are vector-based, you can zoom the display without the pixelation (loss of clarity) of the graphics. Also, if you add, modify, or delete graphics, the display can be immediately updated to reflect the changes. To set whether the display is automatically updated, use MdispControl with M_UPDATE_GRAPHIC_LIST.
The 2D graphics list can also be used to draw destructively in an image, using MgraDraw. Once drawn, the graphics are raster-based and are part of the image buffer; they cannot be modified. Also, if this annotated image is displayed, zooming it will cause pixelation (loss of clarity) of the graphics and changes in line thickness. Using MgraDraw is similar to using a graphics function (for example, MgraArc) to draw destructively in an image.
Graphics can be added to the list using any of the Mgra... graphics functions, such as MgraArc. To remove all graphics from the list, use MgraClear. You can also use MgraControlList with M_DELETE to remove graphics (one or all) from the list.
When you add graphics to the list, they inherit the current settings of the specified 2D graphics context (as described in MgraAlloc); however, there is no link between the 2D graphics list and the 2D graphics context. Graphics already in the list are not affected by changes made to the context. To modify or inquire 2D graphics list settings, use MgraControlList and MgraInquireList.
When the 2D graphics list is no longer required, release it usingMgraFreeunless M_UNIQUE_ID was specified during allocation; if M_UNIQUE_ID was specified, the smart identifier manages the 2D graphics list's lifetime and you must not manually free it.
Parameters
SysId (in, AIL_ID)
Specifies the system on which to allocate the 2D graphics list.
For specifying the system
| Value | Description |
|---|---|
M_DEFAULT_HOST | Specifies the default Host system of the current Aurora Imaging Library application. |
System identifier | Specifies a valid system identifier, previously allocated using MsysAlloc. |
ListGraType (in, AIL_INT64)
Reserved for future expansion and must be set to M_DEFAULT.
ListGraIdPtr *(out, AIL_ID)
Specifies the address of the variable in which to write the 2D graphics list identifier or specifies the data type that the function should use to return the 2D graphics list identifier.
For retrieving the identifier or specifying how to return it
| Value | Description |
|---|---|
M_NULL | Specifies that you will use this function's return value to obtain the identifier of the allocated 2D graphics list; in this case, a standard Aurora Imaging Library identifier of type AIL_ID is returned. |
M_UNIQUE_ID | Specifies that you will use this function's return value to obtain the identifier of the allocated 2D graphics list; in this case, an Aurora Imaging Library smart identifier of type _AIL_UNIQUE_GRA_ID_is returned instead of a standard Aurora Imaging Library identifier.This setting is only available when using C++11 (or later).An Aurora Imaging Library smart identifier manages the lifespan of the Aurora Imaging Library object it owns (similar to a std::unique_ptr). Note, you can use an Aurora Imaging Library smart identifier as though it were a standard Aurora Imaging Library identifier, except that you cannot use it to manually free the 2D graphics list (it is freed automatically). For more information, see Aurora Imaging Library smart identifiers. |
Address in which to write the identifier | Specifies the address of an AIL_ID in which to write the identifier of the allocated 2D graphics list. |
If allocation fails, M_NULL is written as the identifier. |
Return Value
Type: AIL_ID
The returned value is the 2D graphics list identifier either as a standard identifier (AIL_ID) or a smart identifier (AIL_UNIQUE_GRA_ID). If allocation fails, M_NULL is returned (or nullptr ifM_UNIQUE_ID was specified).