Class RMPolygonShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener
Direct Known Subclasses:
RMAnimPathShape, RMLineShape.ArrowHead, RMPencilShape, RMScene3D.RMShape3D

public class RMPolygonShape extends RMParentShape
This class is an RMShape subclass that encapsulates an arbitrary path.

(kathy): No properties to annotate.

  • Constructor Details

    • RMPolygonShape

      public RMPolygonShape()
      Creates a new empty polygon shape.
    • RMPolygonShape

      public RMPolygonShape(RMPath aPath)
      Creates a new polygon shape for the given path.
  • Method Details

    • getPath

      public RMPath getPath()
      Returns the path for this polygon shape.
      Overrides:
      getPath in class RMShape
    • setPath

      public void setPath(RMPath aPath)
      Sets the path for this polygon shape.
    • superSelectable

      public boolean superSelectable()
      Editor method - indicates that this shape can be super selected.
      Overrides:
      superSelectable in class RMShape
    • paintShape

      public void paintShape(RMShapePainter aPntr)
      Handles painting a polygon shape.
      Overrides:
      paintShape in class RMShape
    • toXMLShape

      protected RXElement toXMLShape(RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLShape in class RMParentShape
    • fromXMLShape

      protected void fromXMLShape(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Overrides:
      fromXMLShape in class RMParentShape
    • clone

      public RMPolygonShape clone()
      Standard clone implementation.
      Overrides:
      clone in class RMParentShape
    • getPathTransform

      public RMTransform getPathTransform()
      Returns the matrix which transforms from path space to this shape's space (path space is arbitrarily defined, and always gets scaled to fit exactly into getBoundsInside()).
    • resetPath

      public void resetPath(RMPath newPath)
      Replace the polygon's current path with a new path, adjusting the shape's bounds to match the new path.