com.vividsolutions.jump.workbench.ui.renderer.java2D
Class Java2DConverter
java.lang.Object
com.vividsolutions.jump.workbench.ui.renderer.java2D.Java2DConverter
public class Java2DConverter
- extends java.lang.Object
Converts JTS Geometry objects into Java 2D Shape objects
|
Method Summary |
java.awt.Shape |
toShape(com.vividsolutions.jts.geom.Geometry geometry)
If you pass in a general GeometryCollection, note that a Shape cannot
preserve information about which elements are 1D and which are 2D. |
com.vividsolutions.jts.geom.Coordinate[] |
toViewCoordinates(com.vividsolutions.jts.geom.Coordinate[] modelCoordinates)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Java2DConverter
public Java2DConverter(Java2DConverter.PointConverter pointConverter)
Java2DConverter
public Java2DConverter(Java2DConverter.PointConverter pointConverter,
double resolution)
toViewCoordinates
public com.vividsolutions.jts.geom.Coordinate[] toViewCoordinates(com.vividsolutions.jts.geom.Coordinate[] modelCoordinates)
throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
toShape
public java.awt.Shape toShape(com.vividsolutions.jts.geom.Geometry geometry)
throws java.awt.geom.NoninvertibleTransformException
- If you pass in a general GeometryCollection, note that a Shape cannot
preserve information about which elements are 1D and which are 2D.
For example, if you pass in a GeometryCollection containing a ring and a
disk, you cannot render them as such: if you use Graphics.fill, you'll get
two disks, and if you use Graphics.draw, you'll get two rings. Solution:
create Shapes for each element.
- Throws:
java.awt.geom.NoninvertibleTransformException