Class CharStringConverter


  • public class CharStringConverter
    extends CharStringHandler
    A class to translate Type2 CharString command sequence to Type1 CharString command sequence.
    Version:
    $Revision$
    Author:
    Villu Ruusmann
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Object> convert​(java.util.List<java.lang.Object> commandSequence)
      Converts a sequence of Type1/Type2 commands into a sequence of CharStringCommands.
      java.util.List<java.lang.Integer> handleCommand​(java.util.List<java.lang.Integer> numbers, CharStringCommand command)
      Handler for CharStringCommands.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CharStringConverter

        public CharStringConverter​(int defaultWidth,
                                   int nominalWidth,
                                   IndexData fontGlobalSubrIndex,
                                   IndexData fontLocalSubrIndex)
        Deprecated.
        Constructor.
        Parameters:
        defaultWidth - default width
        nominalWidth - nominal width
      • CharStringConverter

        public CharStringConverter​(int defaultWidth,
                                   int nominalWidth)
        Constructor.
        Parameters:
        defaultWidth - default width
        nominalWidth - nominal width
    • Method Detail

      • convert

        public java.util.List<java.lang.Object> convert​(java.util.List<java.lang.Object> commandSequence)
        Converts a sequence of Type1/Type2 commands into a sequence of CharStringCommands.
        Parameters:
        commandSequence - the type1/type2 sequence
        Returns:
        the CHarStringCommandSequence
      • handleCommand

        public java.util.List<java.lang.Integer> handleCommand​(java.util.List<java.lang.Integer> numbers,
                                                               CharStringCommand command)
        Handler for CharStringCommands.
        Specified by:
        handleCommand in class CharStringHandler
        Parameters:
        numbers - a list of numbers
        command - the CharStringCommand
        Returns:
        may return a command sequence of a subroutine