Global Mapper SDK
GM_CalcScaleRectangle
Calculates the rectangle in global coordinates required to draw at the provided scale to the given device of the given size.
Syntax
C++
Copy
GM_Error_t32 GM_CalcScaleRectangle
(
const GM_Point_t* aCenterPoint, // IN: Center point in global coordinates
double aScale, // IN: Scale to calculate at (i.e. for 1:24K, pass 24000.0)
HDC aDC, // IN: Device context that will be drawn to
sint32 aPixWidth, // IN: pixel width
sint32 aPixHeight, // IN: pixel height
GM_Rectangle_t* aScaleRect // OUT: rectangle at given scale
);