Class JDSpline

All Implemented Interfaces:
JDRotatable

public class JDSpline extends JDPolyline
JDraw Spline graphic object.
  • Constructor Details

    • JDSpline

      public JDSpline(String objectName, Point[] p)
      Contruct a splie
      Parameters:
      objectName - spline name
      p - Array of control points
  • Method Details

    • copy

      public JDObject copy(int x, int y)
      Description copied from class: JDObject
      Returns a copy of this object at the specified location.
      Overrides:
      copy in class JDPolyline
      Parameters:
      x - Horizontal position of the copied object (pixel)
      y - Vertical Position of the copied object (pixel)
      Returns:
      The copy of this object.
    • setStep

      public void setStep(int s)
      Description copied from class: JDPolyline
      Sets the polyline interpolation step.
      Overrides:
      setStep in class JDPolyline
      Parameters:
      s - Interpolation step (must be greater or equal than 1).
    • convertToPolyline

      public JDPolyline convertToPolyline()
    • moveSummit

      public void moveSummit(int id, double x, double y)
      Description copied from class: JDObject
      Moves the specifed summit to the specified position. When using moveSummit() to animate objects, A call to refresh() of this object may be needed.
      Overrides:
      moveSummit in class JDPolyline
      Parameters:
      id - Summit index
      x - Absolute X position
      y - Absolute Y position
      See Also:
    • connect

      public void connect(JDPolyline pline)
      Connects this spline to an other spline. Points are added to the end of this spline. if pline if not a JDSpline, nothing happens.
      Overrides:
      connect in class JDPolyline
      Parameters:
      pline - Polyline to be concatened.