Class PathGenerator


  • public class PathGenerator
    extends java.lang.Object

    An object that knows how to translate a Grid of Marching Squares Contour Cells into a Java AWT General Path.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GeneralPath generalPath​(de.gsi.chart.renderer.spi.marchingsquares.Grid grid)
      Construct a GeneralPath representing the isoline, itself represented by a given Grid.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generalPath

        public GeneralPath generalPath​(de.gsi.chart.renderer.spi.marchingsquares.Grid grid)

        Construct a GeneralPath representing the isoline, itself represented by a given Grid.

        IMPLEMENTATION NOTE: This method is destructive. It alters the Grid instance as it generates the resulting path. If the 'original' Grid instance is needed after invoking this method then it's the responsibility of the caller to deep clone it before passing it here.

        Parameters:
        grid - the matrix of contour cells w/ side crossing coordinates already interpolated and normalized; i.e. in the range 0.0..1.0.
        Returns:
        the geometries of a contour, including sub-path(s) for disjoint area final holes.