Class FilledPen

java.lang.Object
nl.saxion.app.canvas.pens.Pen
nl.saxion.app.canvas.pens.FilledPen

public class FilledPen extends Pen
Extension of the pen. This pen will create polygons with a fill and a stroke. Please note: the filled pen does not support pausing. Shapes will be added as soon as the pen is turned off.
  • Constructor Details

    • FilledPen

      public FilledPen()
  • Method Details

    • turnOn

      public void turnOn()
      Turn the pen on.
      Overrides:
      turnOn in class Pen
    • turnOff

      public void turnOff()
      Turn the pen off.
      Overrides:
      turnOff in class Pen
    • move

      public void move(int distance)
      Move the pen a certain distance. The angle can be set using `headTo` or `rotate`.
      Overrides:
      move in class Pen
      Parameters:
      distance - Distance in pixel
    • moveTo

      public void moveTo(int newX, int newY)
      Move the current pen position to the new x and new y provided. In case the pen is on, a line will be drawn between the previous point and the new point.
      Overrides:
      moveTo in class Pen
      Parameters:
      newX - New x-coordinate
      newY - New y-coordinate