All Implemented Interfaces:
java.lang.Cloneable, DrawOperation
Direct Known Subclasses:
Arc, Ellipse, Rectangle

public abstract class BasicShape
extends ImageOperation
implements DrawOperation
Draw a basic shape
  • Field Details

    • width

      protected int width
    • height

      protected int height
    • strokeWidth

      protected int strokeWidth
    • stroke

      protected java.lang.String stroke
    • fill

      protected java.lang.String fill
  • Constructor Details

  • Method Details

    • setWidth

      public void setWidth​(int w)
      Set the width.
      Parameters:
      w - the width of the shape.
    • setHeight

      public void setHeight​(int h)
      Set the height.
      Parameters:
      h - the height of the shape.
    • setStrokewidth

      public void setStrokewidth​(int sw)
      Set the stroke width attribute.
      Parameters:
      sw - the value to use.
    • setStroke

      public void setStroke​(java.lang.String col)
      Set the stroke attribute.
      Parameters:
      col - the color value to use.
    • setFill

      public void setFill​(java.lang.String col)
      Set the fill attribute.
      Parameters:
      col - the color value to use.