Class RMPainterShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener

public class RMPainterShape extends RMShape
A shape that references another shape and acts.
  • Constructor Details

    • RMPainterShape

      public RMPainterShape()
  • Method Details

    • getTime

      public float getTime()
      Returns the time.
    • setTime

      public void setTime(int aTime)
      Override to trigger act.
      Overrides:
      setTime in class RMShape
    • getPaintShape

      public RMShape getPaintShape()
      Returns the paint shape.
    • setPaintColor

      public void setPaintColor(Color aColor)
      Sets the paint color for path operations.
    • setPaintStrokeWidth

      public void setPaintStrokeWidth(float aWidth)
      Sets the paint stroke width for path operations.
    • setPaintSpeed

      public void setPaintSpeed(float aSpeed)
      Sets the paint speed for path operations.
    • forward

      public void forward(float aDistance)
      Adds a forward instruction to painter.
    • turn

      public void turn(float anAngle)
      Adds a turn instruction to painter.
    • moveTo

      public void moveTo(float anX, float aY)
      Move to.
    • lineTo

      public void lineTo(float anX, float aY)
      Paint a line to given coordinates.
    • quadTo

      public void quadTo(float anX1, float aY1, float anX2, float aY2)
      Paint a parabolic curve with the given control point and end point.
    • curveTo

      public void curveTo(float anX1, float aY1, float anX2, float aY2, float anX3, float aY3)
      Paint a bezier curve with the given control points and end point.
    • paintShape

      public void paintShape(RMShapePainter aPntr)
      Paint shape.
      Overrides:
      paintShape in class RMShape
    • getPainter

      public RMPaintbot getPainter()
      Returns the first painter.
    • getPainterCount

      public int getPainterCount()
      Returns the number of painters.
    • getPainter

      public RMPaintbot getPainter(int anIndex)
      Returns the specific painter at given index.
    • addPainter

      public void addPainter(RMPaintbot aPainter)
      Adds a given painter to painters list.
    • addPainter

      public void addPainter(RMPaintbot aPainter, int anIndex)
      Adds a given painter to painter list at given index.
    • addOpsForPath

      public void addOpsForPath(PathIterator aPathIterator)
      Adds operations for path.
    • getExecutionTime

      public float getExecutionTime()
      Returns the total execution time of all painter shape operations.
    • getExecutionBounds

      public RMRect getExecutionBounds()
      Returns the total bounds from execution.
    • getBoundsMarked

      public RMRect getBoundsMarked()
      Returns the marked bounds.
      Overrides:
      getBoundsMarked in class RMShape
    • computePrefWidth

      public double computePrefWidth(float aHeight)
      Override to get preferred width from instructions.
    • computePrefHeight

      public double computePrefHeight(float aWidth)
      Override to get preferred height from instructions.
    • setParent

      public void setParent(RMParentShape aShape)
      Override to make sure there is a child animator.
      Overrides:
      setParent in class RMShape
    • clone

      public RMPainterShape clone()
      Standard clone implementation.
      Overrides:
      clone in class RMShape
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML Archival.
      Specified by:
      toXML in interface Archivable
      Overrides:
      toXML in class RMShape
    • fromXML

      public RMPainterShape fromXML(RXArchiver anArchiver, RXElement anElement)
      XML Unarchival.
      Specified by:
      fromXML in interface Archivable
      Overrides:
      fromXML in class RMShape