org.apache.fontbox.cff
Class CharStringRenderer

java.lang.Object
  extended by org.apache.fontbox.cff.CharStringHandler
      extended by org.apache.fontbox.cff.CharStringRenderer

public class CharStringRenderer
extends CharStringHandler

This class represents a renderer for a charstring.

Version:
$Revision: 1.0 $
Author:
Villu Ruusmann

Constructor Summary
CharStringRenderer()
           
CharStringRenderer(boolean isType1)
           
 
Method Summary
 Rectangle2D getBounds()
          Returns the bounds of the renderer path.
 int getWidth()
          Returns the width of the current command.
 List<Integer> handleCommand(List<Integer> numbers, CharStringCommand command)
          Handler for CharStringCommands.
 GeneralPath render(List<Object> sequence)
          Renders the given sequence and returns the result as a GeneralPath.
 
Methods inherited from class org.apache.fontbox.cff.CharStringHandler
handleSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharStringRenderer

public CharStringRenderer()

CharStringRenderer

public CharStringRenderer(boolean isType1)
Method Detail

render

public GeneralPath render(List<Object> sequence)
                   throws IOException
Renders the given sequence and returns the result as a GeneralPath.

Parameters:
sequence - the given charstring sequence
Returns:
the rendered GeneralPath
Throws:
IOException

handleCommand

public List<Integer> handleCommand(List<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

getBounds

public Rectangle2D getBounds()
Returns the bounds of the renderer path.

Returns:
the bounds as Rectangle2D

getWidth

public int getWidth()
Returns the width of the current command.

Returns:
the width