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 voidclosepath()A closepath command was seen.voidcurveto(double x1, double y1, double x2, double y2)Called for a quadratic curve.voidcurveto(double x1, double y1, double x2, double y2, double x3, double y3)Called for a cubic curve.voidendchar()Called to signal the end of a glyph's outline.voidflex(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 seenvoidglobalColorOn()A command was seen that says that global coloring applies to this glyph.voidlineto(double x, double y)Called for a line.voidmoveto(double x, double y)Called to set a new currentpoint.voidnoCounters()A command was seen that says that the glyph has no counters.voidnoHints()A command was seen that says that no hints should be applied to the next part of the glyph.voidsetMatrix(Matrix newMatrix)Tells the OutlineConsumer the matrix to be applied to subsequent points in order to get to a 1 ppem size.voidstem(double edge1, double edge2, boolean doHintSubstitution, boolean vertical, boolean isCounter)A stem command was seen.voidstem3(double edge1, double edge2, double edge3, double edge4, double edge5, double edge6, boolean doHintSubstitution, boolean isVertical)A hstem3 or vstem3 command was seen.booleanwidth(double wx)The advance width of the glyph in the x direction
-
-
-
Method Detail
-
setMatrix
public void setMatrix(Matrix newMatrix)
Description copied from interface:OutlineConsumerTells 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:
setMatrixin interfaceOutlineConsumer
-
globalColorOn
public void globalColorOn()
Description copied from interface:HintedOutlineConsumerA 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:
globalColorOnin interfaceHintedOutlineConsumer
-
noCounters
public void noCounters()
Description copied from interface:HintedOutlineConsumerA command was seen that says that the glyph has no counters.- Specified by:
noCountersin interfaceHintedOutlineConsumer
-
noHints
public void noHints()
Description copied from interface:HintedOutlineConsumerA command was seen that says that no hints should be applied to the next part of the glyph.- Specified by:
noHintsin interfaceHintedOutlineConsumer
-
stem
public void stem(double edge1, double edge2, boolean doHintSubstitution, boolean vertical, boolean isCounter)Description copied from interface:HintedOutlineConsumerA stem command was seen.- Specified by:
stemin 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:HintedOutlineConsumerA hstem3 or vstem3 command was seen. The relevant edges are returned- Specified by:
stem3in interfaceHintedOutlineConsumerdoHintSubstitution- 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:HintedOutlineConsumerThe advance width of the glyph in the x direction- Specified by:
widthin 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:OutlineConsumerCalled for a line. The line goes from the current point to (x,y). After this call, the currentpoint should be x,y- Specified by:
linetoin interfaceOutlineConsumer
-
curveto
public void curveto(double x1, double y1, double x2, double y2, double x3, double y3)Description copied from interface:OutlineConsumerCalled 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:
curvetoin interfaceOutlineConsumer
-
curveto
public void curveto(double x1, double y1, double x2, double y2)Description copied from interface:OutlineConsumerCalled 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:
curvetoin interfaceOutlineConsumer
-
moveto
public void moveto(double x, double y)Description copied from interface:OutlineConsumerCalled 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:
movetoin 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:HintedOutlineConsumerA flex command was seen- Specified by:
flexin interfaceHintedOutlineConsumer
-
closepath
public void closepath()
Description copied from interface:HintedOutlineConsumerA closepath command was seen. Note that closepath does NOT update the current point.- Specified by:
closepathin interfaceHintedOutlineConsumer
-
endchar
public void endchar()
Description copied from interface:OutlineConsumerCalled to signal the end of a glyph's outline. The last path will already be closed by the time this is called.- Specified by:
endcharin interfaceOutlineConsumer
-
-