All Implemented Interfaces:
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 String stroke
    • fill

      protected String fill
  • Constructor Details

    • BasicShape

      public BasicShape()
  • Method Details

    • setWidth

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

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

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

      public void setStroke(String col)
      Set the stroke attribute.
      col - the color value to use.
    • setFill

      public void setFill(String col)
      Set the fill attribute.
      col - the color value to use.