globalmapper.CalcScaleRectangle =============================== .. currentmodule:: globalmapper .. py:function:: CalcScaleRectangle (GM_Point_t aCenterPoint, float aScale, HDC aDC, sint32 aPixWidth, sint32 aPixHeight) -> GM_Error_t32, GM_Rectangle_t .. 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. :param GM_Point_t aCenterPoint: Center point in global coordinates :param float aScale: Scale to calculate at (i.e. for 1:24K, pass 24000.0) :param HDC aDC: Device context that will be drawn to :param sint32 aPixWidth: pixel width :param sint32 aPixHeight: pixel height :returns: Error Code :rtype: GM_Error_t32 :return: Rectangle at given scale :rtype: GM_Rectangle_t