| Customize Help

Steps to performing annotations



The following steps provide a basic methodology for using the MIL Graphics module to perform annotations:

  1. Allocate a 2D graphics context, using MgraAlloc() to store your drawing preference (for example, foreground and background color).

  2. Allocate an image buffer, using MbufAlloc...(), or, allocate a 2D graphics list, using MgraAllocList(), on which to perform the drawing operation.

  3. If necessary, associate the 2D graphics list with a display, using MdispControl() with M_ASSOCIATED_GRAPHIC_LIST_ID, to non-destructively annotate the image selected to the display.

  4. If necessary, modify 2D graphics context or 2D graphics list settings, using MgraControl() or MgraControlList().

  5. Draw graphics destructively in an image buffer or add graphics to the 2D graphics list, using:

  6. If necessary, annotate an image destructively with the graphics contained in the 2D graphics list, using MgraDraw().

  7. Free all your allocated objects using MgraFree().