Class GPath

All Implemented Interfaces:
Cloneable, Iterable<GPoint>

public class GPath extends GMultiPoint
Author:
Federico Vera <[email protected]>
  • Constructor Details

    • GPath

      public GPath(GPath e)
      Copy constructor
      Parameters:
      e - GPath to copy
      Throws:
      IllegalArgumentException - if e is null
    • GPath

      public GPath(int size)
      Parameters:
      size - initial reserved size
      Throws:
      NegativeArraySizeException - if size is less than zero
    • GPath

      public GPath(int[] xs, int[] ys)
      Parameters:
      xs - list of X coordinates
      ys - list of Y coordinates
      Throws:
      IllegalArgumentException - if either array is null
      InvalidArgumentException - if the array size doesn't match
    • GPath

      public GPath()
      Creates a new empty Path
  • Method Details

    • draw

      public void draw(Graphics2D g)
      Description copied from class: GraphicE
      Draws the component on the given graphics
      Specified by:
      draw in class GraphicE
      Parameters:
      g - where to draw
    • clone

      public GPath clone()
      Specified by:
      clone in class GFillableE