Package org.apache.fontbox.cff
Class CharStringRenderer
java.lang.Object
org.apache.fontbox.cff.CharStringHandler
org.apache.fontbox.cff.CharStringRenderer
This class represents a renderer for a charstring.
- Version:
- $Revision: 1.0 $
- Author:
- Villu Ruusmann
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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
Modifier and TypeMethodDescriptionReturns the bounds of the renderer path.int
getWidth()
Returns the width of the current command.handleCommand
(List<Integer> numbers, CharStringCommand command) Handler for CharStringCommands.Renders the given sequence and returns the result as a GeneralPath.Methods inherited from class org.apache.fontbox.cff.CharStringHandler
handleSequence
-
Constructor Details
-
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 Details
-
render
Renders the given sequence and returns the result as a GeneralPath.- Parameters:
sequence
- the given charstring sequence- Returns:
- the rendered GeneralPath
-
handleCommand
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
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
-