| MIL 10 Reference
| Customize Help
| Save Settings

MgraAllocList



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Allocate a graphics list.
Syntax
MIL_ID MgraAllocList(
MIL_ID SysId, //in
MIL_INT64 ListGraType, //in
MIL_ID *ListGraIdPtr //out
)
Description

This function allocates a graphics list, which holds graphics in vector (mathematical) form. Different graphics lists can coexist; use their identifier to specify which to use or change. When a graphics list is no longer required, you should release its memory, using MgraFree().

The graphics list can be used to annotate the display non-destructively, using MdispControl() with M_ASSOCIATED_GRAPHIC_LIST_ID. Since graphics in a 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 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 graphics context (as described in MgraAlloc()); however, there is no link between the graphics list and the graphics context. Graphics already in the list are not affected by changes made to the context. To modify or inquire graphics list settings, use MgraControlList() and MgraInquireList().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SysId INQ

Specifies the system on which to allocate the graphics list.

This parameter should be set to one of the following values:

function map For specifying the system
CollapseValue Description
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

ListGraType

Reserved for future expansion and must be set to M_DEFAULT.

ListGraIdPtr

Specifies the address of the variable in which to write the graphics list identifier. Since the MgraAllocList() function also returns the graphics list identifier, you can set this parameter to M_NULL.

Return value
The returned value is the graphics list identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT HOST