Package com.adobe.fontengine.font.type1
Class Type1CStringConsumerDefault
- java.lang.Object
-
- com.adobe.fontengine.font.type1.Type1CStringConsumerDefault
-
- All Implemented Interfaces:
HintedOutlineConsumer
,OutlineConsumer
public class Type1CStringConsumerDefault extends java.lang.Object implements HintedOutlineConsumer
The default implementation of a type1 charstring consumer, which simply eats all of the charstring information.Synchronization
This class contains no instance data or mutable static data. It is therefore threadsafe.
-
-
Constructor Summary
Constructors Constructor Description Type1CStringConsumerDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closepath()
A closepath command was seen.void
curveto(double x1, double y1, double x2, double y2)
Called for a quadratic curve.void
curveto(double x1, double y1, double x2, double y2, double x3, double y3)
Called for a cubic curve.void
endchar()
Called to signal the end of a glyph's outline.void
flex(double depth, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, double x6, double y6)
A flex command was seenvoid
globalColorOn()
A command was seen that says that global coloring applies to this glyph.void
lineto(double x, double y)
Called for a line.void
moveto(double x, double y)
Called to set a new currentpoint.void
noCounters()
A command was seen that says that the glyph has no counters.void
noHints()
A command was seen that says that no hints should be applied to the next part of the glyph.void
setMatrix(Matrix newMatrix)
Tells the OutlineConsumer the matrix to be applied to subsequent points in order to get to a 1 ppem size.void
stem(double edge1, double edge2, boolean doHintSubstitution, boolean vertical, boolean isCounter)
A stem command was seen.void
stem3(double edge1, double edge2, double edge3, double edge4, double edge5, double edge6, boolean doHintSubstitution, boolean isVertical)
A hstem3 or vstem3 command was seen.boolean
width(double wx)
The advance width of the glyph in the x direction
-
-
-
Method Detail
-
setMatrix
public void setMatrix(Matrix newMatrix)
Description copied from interface:OutlineConsumer
Tells the OutlineConsumer the matrix to be applied to subsequent points in order to get to a 1 ppem size. It is possible for setMatrix to be called multiple times for a single glyph. Each call replaces the previous matrix. It is guaranteed that setMatrix will be called prior to any other methods.- Specified by:
setMatrix
in interfaceOutlineConsumer
-
globalColorOn
public void globalColorOn()
Description copied from interface:HintedOutlineConsumer
A command was seen that says that global coloring applies to this glyph. One pass global coloring should be used if <@link HintedOutlineConsumer#noCounters()> is called or if a counter hint is associated with this glyph. Otherwise, two pass global coloring should be used.- Specified by:
globalColorOn
in interfaceHintedOutlineConsumer
-
noCounters
public void noCounters()
Description copied from interface:HintedOutlineConsumer
A command was seen that says that the glyph has no counters.- Specified by:
noCounters
in interfaceHintedOutlineConsumer
-
noHints
public void noHints()
Description copied from interface:HintedOutlineConsumer
A command was seen that says that no hints should be applied to the next part of the glyph.- Specified by:
noHints
in interfaceHintedOutlineConsumer
-
stem
public void stem(double edge1, double edge2, boolean doHintSubstitution, boolean vertical, boolean isCounter)
Description copied from interface:HintedOutlineConsumer
A stem command was seen.- Specified by:
stem
in interfaceHintedOutlineConsumer
- Parameters:
edge1
- The bottom/left edge.edge2
- The top/right edge. If isCounter is false and the stem is a topmost, rightmost, bottommost, or leftmost edge, the order of the edges is reversed (ie edge1 > edge2). If isCounter is true and the stem is the last counter in the current counter group, the order of the edges is reversed (ie edge1 > edge2).doHintSubstitution
- If isCounter is false, hint substitution must occur at this point iff doHintSubstitution is true. Else iff doHintSubstitution is true and isCounter is true, a new counter group must be started at this point.vertical
- true iff the command was a vertical stem/counter.isCounter
- true iff the stem should be added to the current counter group.
-
stem3
public void stem3(double edge1, double edge2, double edge3, double edge4, double edge5, double edge6, boolean doHintSubstitution, boolean isVertical)
Description copied from interface:HintedOutlineConsumer
A hstem3 or vstem3 command was seen. The relevant edges are returned- Specified by:
stem3
in interfaceHintedOutlineConsumer
doHintSubstitution
- If true, hint substitution must occur at this point.isVertical
- true iff this command is a vstem3
-
width
public boolean width(double wx)
Description copied from interface:HintedOutlineConsumer
The advance width of the glyph in the x direction- Specified by:
width
in interfaceHintedOutlineConsumer
- Parameters:
wx
- the advance width- Returns:
- true if charstring processing should continue. false otherwise.
-
lineto
public void lineto(double x, double y)
Description copied from interface:OutlineConsumer
Called for a line. The line goes from the current point to (x
,y
). After this call, the currentpoint should be x,y- Specified by:
lineto
in interfaceOutlineConsumer
-
curveto
public void curveto(double x1, double y1, double x2, double y2, double x3, double y3)
Description copied from interface:OutlineConsumer
Called for a cubic curve. The control points are the current point, (x2
,y2
), (x3
,y3
), (x4
,y4
). After this call, the currentpoint should be x4, y4.- Specified by:
curveto
in interfaceOutlineConsumer
-
curveto
public void curveto(double x1, double y1, double x2, double y2)
Description copied from interface:OutlineConsumer
Called for a quadratic curve. The control points are the current point, (x2
,y2
), (x3
,y3
). After this call, the currentpoint should be x3, y3.- Specified by:
curveto
in interfaceOutlineConsumer
-
moveto
public void moveto(double x, double y)
Description copied from interface:OutlineConsumer
Called to set a new currentpoint. If lineto or curveto was previously been called and was the most recent function called, an implied lineto should precede this move and should close the previous segment by connecting the last point in the most recent line/curve with the point that started the last segment.- Specified by:
moveto
in interfaceOutlineConsumer
- Parameters:
x
- the x coordinate of the new currentpointy
- the y coordinate of the new currentpoint
-
flex
public void flex(double depth, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, double x6, double y6)
Description copied from interface:HintedOutlineConsumer
A flex command was seen- Specified by:
flex
in interfaceHintedOutlineConsumer
-
closepath
public void closepath()
Description copied from interface:HintedOutlineConsumer
A closepath command was seen. Note that closepath does NOT update the current point.- Specified by:
closepath
in interfaceHintedOutlineConsumer
-
endchar
public void endchar()
Description copied from interface:OutlineConsumer
Called to signal the end of a glyph's outline. The last path will already be closed by the time this is called.- Specified by:
endchar
in interfaceOutlineConsumer
-
-