Package org.apache.fontbox.cff
Class CharStringRenderer
- java.lang.Object
-
- org.apache.fontbox.cff.CharStringHandler
-
- 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
Constructors Constructor Description CharStringRenderer()
Constructor for the char string renderer.CharStringRenderer(boolean isType1)
Constructor for the char string renderer with a parameter to determine whether the rendered CharString is type 1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2D
getBounds()
Returns the bounds of the renderer path.int
getWidth()
Returns the width of the current command.java.util.List<java.lang.Integer>
handleCommand(java.util.List<java.lang.Integer> numbers, CharStringCommand command)
Handler for CharStringCommands.java.awt.geom.GeneralPath
render(java.util.List<java.lang.Object> sequence)
Renders the given sequence and returns the result as a GeneralPath.-
Methods inherited from class org.apache.fontbox.cff.CharStringHandler
handleSequence
-
-
-
-
Constructor Detail
-
CharStringRenderer
public CharStringRenderer()
Constructor for the char string renderer.
-
CharStringRenderer
public CharStringRenderer(boolean isType1)
Constructor for the char string renderer with a parameter to determine whether the rendered CharString is type 1.- Parameters:
isType1
- Determines wheher the charstring is type 1
-
-
Method Detail
-
render
public java.awt.geom.GeneralPath render(java.util.List<java.lang.Object> sequence)
Renders the given sequence and returns the result as a GeneralPath.- Parameters:
sequence
- the given charstring sequence- Returns:
- the rendered GeneralPath
-
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 classCharStringHandler
- Parameters:
numbers
- a list of numberscommand
- the CharStringCommand- Returns:
- may return a command sequence of a subroutine
-
getBounds
public java.awt.geom.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
-
-