uk.me.parabola.util
Class Java2DConverter

java.lang.Object
  extended by uk.me.parabola.util.Java2DConverter

public class Java2DConverter
extends java.lang.Object


Constructor Summary
Java2DConverter()
           
 
Method Summary
static java.util.List<java.awt.geom.Area> areaToSingularAreas(java.awt.geom.Area area)
          Convert an area that may contains multiple areas to a list of singular areas
static java.awt.geom.Area createArea(java.util.List<Coord> points)
           
static java.awt.Polygon createPolygon(java.util.List<Coord> points)
          Create a polygon from a list of points.
static java.util.List<Coord> singularAreaToPoints(java.awt.geom.Area area)
          Convert an area to an mkgmap way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java2DConverter

public Java2DConverter()
Method Detail

createArea

public static java.awt.geom.Area createArea(java.util.List<Coord> points)

createPolygon

public static java.awt.Polygon createPolygon(java.util.List<Coord> points)
Create a polygon from a list of points.

Parameters:
points - list of points
Returns:
the polygon

areaToSingularAreas

public static java.util.List<java.awt.geom.Area> areaToSingularAreas(java.awt.geom.Area area)
Convert an area that may contains multiple areas to a list of singular areas

Parameters:
area - an area
Returns:
list of singular areas

singularAreaToPoints

public static java.util.List<Coord> singularAreaToPoints(java.awt.geom.Area area)
Convert an area to an mkgmap way. The caller must ensure that the area is singular. Otherwise only the first part of the area is converted.

Parameters:
area - the area
wayId - the wayid for the new way
Returns:
a new mkgmap way