globalmapper.ConvertCoordGroundToPixel

globalmapper.ConvertCoordGroundToPixel(float aGroundX, float aGroundY, GM_Rectangle_t aWorldBounds, GM_PixelRect_t aPixelRect) GM_Error_t32, sint32, sint32[source]

Convert a coordinate between the current projection and pixel space. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.

The results will be returned as sint32’s. To get floats instead, use the function ConvertCoordGroundToPixelDouble.

Parameters:
  • aGroundX (float) – X Coord in current projection

  • aGroundY (float) – Y Coord in current projection

  • aWorldBounds (GM_Rectangle_t) – World bounds to convert from or None for last drawn

  • aPixelRect (GM_PixelRect_t) – Pixel bounds to convert from or None for last drawn

Returns:

Error Code

Return type:

GM_Error_t32

Returns:

X Coord in pixel space

Return type:

sint32

Returns:

Y Coord in pixel space

Return type:

sint32