Class RMPainterShape

    • Constructor Detail

      • RMPainterShape

        public RMPainterShape()
    • Method Detail

      • 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​(java.awt.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.
      • 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​(java.awt.geom.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.
      • 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