Global Mapper SDK
GM_ExportMapLayoutComponent
Exports a component of the currently setup map layout (use GM_LoadMapLayoutFile to load a layout definition) to a bitmap (BMP) file. The bounding box and pixel dimensions that you specify are the same as you would provide to the GM_DrawLayerList function and are used to determine the pixel size that the BMP file will use. If you always call this after a draw, just pass in NULL for the world bounds and 0 for both pixel dimensions.
Syntax
C++
Copy
GM_DLL_EXPORTED GM_Error_t32 __stdcall GM_ExportMapLayoutComponent
(
const char* aFilename, // in: name of bitmap file to save to
GM_MapLayoutPiece_t8 aPiece, // in: which piece of the map layout to save
const GM_Rectangle_t* aWorldBounds, // in: World bounds to use for rendering layout or NULL for last drawn
sint32 aPixelWidth, // in: Width in pixels of FULL RENDER SCREEN (NOT LAYOUT PIECE) to use for generating map layout. Use 0 for last drawn.
sint32 aPixelHeight, // in: Height in pixels of FULL RENDER SCREEN (NOT LAYOUT PIECE) to use for generating map layout. Use 0 for last drawn.
void* aReserved // reserved for later use, must be NULL
)