Class VectorShape

  • All Implemented Interfaces:
    Shape

    public class VectorShape
    extends java.lang.Object
    implements Shape
    • Field Detail

      • label

        public final java.lang.String label
    • Constructor Detail

      • VectorShape

        public VectorShape()
      • VectorShape

        public VectorShape​(java.lang.String label)
    • Method Detail

      • from

        public static VectorShape from​(java.nio.ByteBuffer buf)
      • optimize

        public VectorShape optimize()
        Optimize the vectors by removing useless vectors or replacing a series with a shorter series. At this point, everything is based off of a regex with a potential modification.
      • toShortCommands

        public java.lang.String toShortCommands()
      • appendShortCommands

        public void appendShortCommands​(java.lang.String line)
      • appendShortCommand

        public void appendShortCommand​(char cmd)
      • appendLongCommands

        public void appendLongCommands​(java.lang.String line)
      • toBytes

        public byte[] toBytes()
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Shape
        Indicates if this shape is empty.
        Specified by:
        isEmpty in interface Shape
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: Shape
        Get the label of this shape.
        Specified by:
        getLabel in interface Shape
      • toBitmap

        public BitmapShape toBitmap()
        Description copied from interface: Shape
        Transform to a BitmapShape.
        Specified by:
        toBitmap in interface Shape
      • toVector

        public VectorShape toVector()
        Description copied from interface: Shape
        Transform to a VectorShape.
        Specified by:
        toVector in interface Shape