globalmapper.DrawLayerListEx¶
- globalmapper.DrawLayerListEx(HDC aDC, [GM_LayerHandle_t32] aLayerList, GM_DrawFlags_t32 aDrawFlags, GM_Rectangle_t aWorldBounds, sint32 aLeftPixel, sint32 aTopPixel, sint32 aPixelWidth, sint32 aPixelHeight, string aExtraOpts) GM_Error_t32 [source]¶
Note
This function requires a Handle to Device Context (HDC), which comes from the Windows GUI. An HDC for a window is easy to get in C++, but unobtainable in Python without relying on other modules. As such, you may be unable to use this and other functions which need an HDC as parameter; they are included in the Python SDK for Global Mapper primarily for consistency with the C++ version of the SDK and are not fully supported at current release.
Draws one or more layers to the provided device context at the given location. If aWorldBounds is not None, at least the specified area will be drawn. The aspect ratio of the screen pixels will be maintained, so slightly more of the world bounds than specified may be drawn. If aWorldBounds is None, the entire specified layer or all of the loaded layers will be rendered.
Additional options can be provided in aExtraOpts using the format “name=value”. The following option names are supported:
ORIENTATION - orientation angle in degrees to use rather than value set with SetOrientation. The orientation will remain set in this thread until SetOrientation is called or another draw with an ORIENTATION parameter is done. (0 is north up, 90 is east up, 180 is south up, 270 is west up)
- Parameters:
aDC (HDC) – Device context to draw to
aLayerList ([GM_LayerHandle_t32]) – List of layers to draw or None for all
aDrawFlags (GM_DrawFlags_t32) – Flags controlling how the draw is performed
aWorldBounds (GM_Rectangle_t) – World bounds to draw or None for all
aLeftPixel (sint32) – Left pixel coordinate to draw to
aTopPixel (sint32) – Top pixel coordinate to draw to
aPixelWidth (sint32) – Width in pixels to draw
aPixelHeight (sint32) – Height in pixels to draw
aExtraOpts (str) – Optional string containing extra options in “name=value” form, like “ORIENTATION=30”
- Returns:
Error Code
- Return type:
GM_Error_t32