CalcScaleRectangle¶
- globalmapper.CalcScaleRectangle(GM_Point_t aCenterPoint, float aScale, HDC aDC, sint32 aPixWidth, sint32 aPixHeight) GM_Error_t32, GM_Rectangle_t [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.
Calculate the rectangle in global coordinates required to draw at the provided scale to the given device of the given size.
- Parameters:
aCenterPoint (GM_Point_t) – Center point in global coordinates
aScale (float) – Scale to calculate at (i.e. for 1:24K, pass 24000.0)
aDC (HDC) – Device context that will be drawn to
aPixWidth (sint32) – pixel width
aPixHeight (sint32) – pixel height
- Returns:
Error Code
- Return type:
GM_Error_t32
- Returns:
Rectangle at given scale
- Return type: