void WindowProjection::UpdateScreenBounds() { assert(screen_size_initialised); if (!IsValid()) return; GeoBounds sb(ScreenToGeo(0, 0)); sb.Extend(ScreenToGeo(screen_size.x, 0)); sb.Extend(ScreenToGeo(screen_size.x, screen_size.y)); sb.Extend(ScreenToGeo(0, screen_size.y)); screen_bounds = sb; }
void WindowProjection::UpdateScreenBounds() { assert(screen_size_initialised); if (!IsValid()) return; GeoBounds sb(ScreenToGeo(0, 0)); sb.Extend(ScreenToGeo(screen_width, 0)); sb.Extend(ScreenToGeo(screen_width, screen_height)); sb.Extend(ScreenToGeo(0, screen_height)); screenbounds_latlon = sb; }
/** * Converts screen coordinates to a GeoPoint * @param x x-Coordinate on the screen * @param y y-Coordinate on the screen */ gcc_pure GeoPoint ScreenToGeo(const RasterPoint &pt) const { return ScreenToGeo(pt.x, pt.y); }
GeoPoint WindowProjection::GetGeoScreenCenter() const { return ScreenToGeo(GetScreenWidth() / 2, GetScreenHeight() / 2); }