Class ContourAccumulator

java.lang.Object
org.opensourcephysics.display2d.ContourAccumulator

public final class ContourAccumulator extends Object
Title: Contour Description: The class LineAccumulator accumulates line drawing information and then draws all accumulated lines together. It is used as contour accumulator in the contour plot. The contour plot uses some code from the Surface Plotter package by Yanto Suryono.
Version:
1.0
Author:
Wolfgang Christian
  • Method Details

    • addLine

      public void addLine(int x1, int y1, int x2, int y2)
      Adds a line to the accumulator.
      Parameters:
      x1 - the first point's x coordinate
      y1 - the first point's y coordinate
      x2 - the second point's x coordinate
      y2 - the second point's y coordinate
    • clearAccumulator

      public void clearAccumulator()
      Clears accumulator.
    • drawAll

      public void drawAll(Graphics g)
      Draws all accumulated lines.
      Parameters:
      g - the graphics context to draw