Package com.macrofocus.treemap.voronoi
Class ShapeConverter
- java.lang.Object
-
- com.macrofocus.treemap.voronoi.ShapeConverter
-
public class ShapeConverter extends java.lang.Object
A polygon converter for Voronoi raster output
-
-
Constructor Summary
Constructors Constructor Description ShapeConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
getShapeByMarchingSquares(VoronoiCell[] cells, VoronoiOutputRaster outputRaster, java.util.List<Vertex> vertexes, java.awt.Shape parent)
Generates the polygon shape of Voronoi cells according to raster data using the marching squares algorithm.
-
-
-
Method Detail
-
getShapeByMarchingSquares
public static void getShapeByMarchingSquares(VoronoiCell[] cells, VoronoiOutputRaster outputRaster, java.util.List<Vertex> vertexes, java.awt.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
-
-
-