예제 #1
0
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;
}
예제 #2
0
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;
}
예제 #3
0
 /**
  * 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);
 }
예제 #4
0
GeoPoint
WindowProjection::GetGeoScreenCenter() const
{
  return ScreenToGeo(GetScreenWidth() / 2, GetScreenHeight() / 2);
}