Package com.treemap.swing.voronoi
Class ShapeConverter
java.lang.Object
com.treemap.swing.voronoi.ShapeConverter
A polygon converter for Voronoi raster output
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
getShapeByMarchingSquares
(VoronoiCell[] cells, VoronoiOutputRaster outputRaster, List<Vertex> vertexes, com.macrofocus.geom.Shape parent) Generates the polygon shape of Voronoi cells according to raster data using the marching squares algorithm.
-
Constructor Details
-
ShapeConverter
public ShapeConverter()
-
-
Method Details
-
getShapeByMarchingSquares
public static void getShapeByMarchingSquares(VoronoiCell[] cells, VoronoiOutputRaster outputRaster, List<Vertex> vertexes, com.macrofocus.geom.Shape parent) Generates the polygon shape of Voronoi cells according to raster data using the marching squares algorithm. If the vertexes parameter is null un-smooth polygons are created. Other wise smooth GenralPaths are creaed.- Parameters:
cells
- the cells to calculate there polygonsoutputRaster
- the raster outputRastervertexes
- a list of vertexes (or vertexes) of the diagram. If this parameter is null, un-smooth polygons are generated.parent
-
-