|
|
|
|
This document contains the reference manual for the SciTech MGL Graphics Library and associated supplemental libraries. Please consult the MGL Getting Started and Programmer’s Guide for more information on programming with the SciTech MGL.
All functions in the SciTech MGL work with an MGL device context (MGLDC), which can either be a specific device context passed to the function, or the currently active device context. All routines that take a specific MGLDC pointer, don’t work with the values in the currently active device context, which means that these routines can be used to update a different device context than the currently active one. However if the device context passed is actually the currently active context, all the changes made to the specific device context will also be made to the currently active context as well.
Most of the routines in SciTech MGL are bound to the currently active device context, which can be changed with the MGL_makeCurrentDC function. When a context is made the currently active context, the values in the device context are cached in a special global data area for speed. Hence you should not change the values in a device context directly if that context is currently active, but should use the proper MGL functions to do so. When the active device context is changed to a new device context, the values in the currently cached device context are then flushed back to the original device context.
Because there is a lot of copying going on when changing active device context, this is something that you would not normally do between drawing individual primitives. Normally you will have one main device context for all your drawing output (either a memory device context or a display device context) that you will be drawing into, and this context will generally not change. The SciTech MGL will however not perform any copying if you attempt to set the active device context to the same device context. You can also set the active device context to nothing, by passing a NULL to MGL_makeCurrentDC.
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com