Class Type2ConsumerDefaultImpl

  • All Implemented Interfaces:
    Type2Consumer

    public class Type2ConsumerDefaultImpl
    extends java.lang.Object
    implements Type2Consumer
    Empty implementation of Type2Consumer, useful as a base class for an actual implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abs​(double[] stack, int stackDepth)  
      void add​(double[] stack, int stackDepth)  
      void and​(double[] stack, int stackDepth)  
      void callgsubr​(double[] stack, int stackDepth, int subr)  
      void callsubr​(double[] stack, int stackDepth, int subr)  
      void cntrmask​(double[] stack, int stackDepth, com.adobe.fontengine.font.cff.CFFByteArray data, int offset, int length)  
      void div​(double[] stack, int stackDepth)  
      void drop​(double[] stack, int stackDepth)  
      void dup​(double[] stack, int stackDepth)  
      void endchar​(double[] stack, int stackDepth)  
      void eq​(double[] stack, int stackDepth)  
      void exch​(double[] stack, int stackDepth)  
      void flex​(double[] stack, int stackDepth)  
      void flex1​(double[] stack, int stackDepth)  
      void get​(double[] stack, int stackDepth)  
      void globalColorMe​(double[] stack, int stackDepth)  
      void hflex​(double[] stack, int stackDepth)  
      void hflex1​(double[] stack, int stackDepth)  
      void hhcurveto​(double[] stack, int stackDepth)  
      void hintmask​(double[] stack, int stackDepth, com.adobe.fontengine.font.cff.CFFByteArray data, int offset, int length)  
      void hlineto​(double[] stack, int stackDepth)  
      void hmoveto​(double[] stack, int stackDepth)  
      void hstem​(double[] stack, int stackDepth)  
      void hstemhm​(double[] stack, int stackDepth)  
      void hvcurveto​(double[] stack, int stackDepth)  
      void ifelse​(double[] stack, int stackDepth)  
      void implicit_vstemhm​(double[] stack, int stackDepth)
      Called when there is vstemhm operator implied by a hintmask or cntrmask operator.
      void index​(double[] stack, int stackDepth)  
      void integer​(double[] stack, int stackDepth, int i)  
      void moveto​(double[] stack, int stackDepth)
      An absolute moveto (that is, a moveto that is not relative to the current point).
      void mul​(double[] stack, int stackDepth)  
      void neg​(double[] stack, int stackDepth)  
      void not​(double[] stack, int stackDepth)  
      void or​(double[] stack, int stackDepth)  
      void put​(double[] stack, int stackDepth)  
      void random​(double[] stack, int stackDepth)  
      void rcurveline​(double[] stack, int stackDepth)  
      void real​(double[] stack, int stackDepth, double a)  
      void return_op​(double[] stack, int stackDepth)  
      void rlinecurve​(double[] stack, int stackDepth)  
      void rlineto​(double[] stack, int stackDepth)  
      void rmoveto​(double[] stack, int stackDepth)  
      void roll​(double[] stack, int stackDepth)  
      void rrcurveto​(double[] stack, int stackDepth)  
      boolean seac​(double[] stack, int stackDepth)  
      void sqrt​(double[] stack, int stackDepth)  
      void sub​(double[] stack, int stackDepth)  
      void vhcurveto​(double[] stack, int stackDepth)  
      void vlineto​(double[] stack, int stackDepth)  
      void vmoveto​(double[] stack, int stackDepth)  
      void vstem​(double[] stack, int stackDepth)  
      void vstemhm​(double[] stack, int stackDepth)  
      void vvcurveto​(double[] stack, int stackDepth)  
      boolean width​(double w)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Type2ConsumerDefaultImpl

        public Type2ConsumerDefaultImpl()
    • Method Detail

      • abs

        public void abs​(double[] stack,
                        int stackDepth)
        Specified by:
        abs in interface Type2Consumer
      • add

        public void add​(double[] stack,
                        int stackDepth)
        Specified by:
        add in interface Type2Consumer
      • and

        public void and​(double[] stack,
                        int stackDepth)
        Specified by:
        and in interface Type2Consumer
      • callgsubr

        public void callgsubr​(double[] stack,
                              int stackDepth,
                              int subr)
        Specified by:
        callgsubr in interface Type2Consumer
        subr - the index of the global subroutine which is called.
      • callsubr

        public void callsubr​(double[] stack,
                             int stackDepth,
                             int subr)
        Specified by:
        callsubr in interface Type2Consumer
        subr - the index of the local subroutine which is called.
      • cntrmask

        public void cntrmask​(double[] stack,
                             int stackDepth,
                             com.adobe.fontengine.font.cff.CFFByteArray data,
                             int offset,
                             int length)
                      throws InvalidFontException
        Specified by:
        cntrmask in interface Type2Consumer
        data - holds the charstring (or subroutine) being interpreted
        offset - the index of the first byte representing the cntrmask
        length - the number of bytes in the cntrmask
        Throws:
        InvalidFontException
      • div

        public void div​(double[] stack,
                        int stackDepth)
        Specified by:
        div in interface Type2Consumer
      • drop

        public void drop​(double[] stack,
                         int stackDepth)
        Specified by:
        drop in interface Type2Consumer
      • dup

        public void dup​(double[] stack,
                        int stackDepth)
        Specified by:
        dup in interface Type2Consumer
      • endchar

        public void endchar​(double[] stack,
                            int stackDepth)
        Specified by:
        endchar in interface Type2Consumer
      • eq

        public void eq​(double[] stack,
                       int stackDepth)
        Specified by:
        eq in interface Type2Consumer
      • exch

        public void exch​(double[] stack,
                         int stackDepth)
        Specified by:
        exch in interface Type2Consumer
      • flex

        public void flex​(double[] stack,
                         int stackDepth)
        Specified by:
        flex in interface Type2Consumer
      • flex1

        public void flex1​(double[] stack,
                          int stackDepth)
        Specified by:
        flex1 in interface Type2Consumer
      • real

        public void real​(double[] stack,
                         int stackDepth,
                         double a)
        Specified by:
        real in interface Type2Consumer
        a - the real number which is pushed on the stack by a 5 byte number operator.
      • get

        public void get​(double[] stack,
                        int stackDepth)
        Specified by:
        get in interface Type2Consumer
      • hflex

        public void hflex​(double[] stack,
                          int stackDepth)
        Specified by:
        hflex in interface Type2Consumer
      • hflex1

        public void hflex1​(double[] stack,
                           int stackDepth)
        Specified by:
        hflex1 in interface Type2Consumer
      • hhcurveto

        public void hhcurveto​(double[] stack,
                              int stackDepth)
        Specified by:
        hhcurveto in interface Type2Consumer
      • hintmask

        public void hintmask​(double[] stack,
                             int stackDepth,
                             com.adobe.fontengine.font.cff.CFFByteArray data,
                             int offset,
                             int length)
                      throws InvalidFontException
        Specified by:
        hintmask in interface Type2Consumer
        data - holds the charstring (or subroutine) being interpreted
        offset - the index of the first byte representing the hintmask
        length - the number of bytes in the hintmask
        Throws:
        InvalidFontException
      • hlineto

        public void hlineto​(double[] stack,
                            int stackDepth)
        Specified by:
        hlineto in interface Type2Consumer
      • hmoveto

        public void hmoveto​(double[] stack,
                            int stackDepth)
        Specified by:
        hmoveto in interface Type2Consumer
      • moveto

        public void moveto​(double[] stack,
                           int stackDepth)
        Description copied from interface: Type2Consumer
        An absolute moveto (that is, a moveto that is not relative to the current point). stack[0] contains the new x. stack[1] contains the new y.
        Specified by:
        moveto in interface Type2Consumer
      • hstem

        public void hstem​(double[] stack,
                          int stackDepth)
        Specified by:
        hstem in interface Type2Consumer
      • hstemhm

        public void hstemhm​(double[] stack,
                            int stackDepth)
        Specified by:
        hstemhm in interface Type2Consumer
      • hvcurveto

        public void hvcurveto​(double[] stack,
                              int stackDepth)
        Specified by:
        hvcurveto in interface Type2Consumer
      • ifelse

        public void ifelse​(double[] stack,
                           int stackDepth)
        Specified by:
        ifelse in interface Type2Consumer
      • implicit_vstemhm

        public void implicit_vstemhm​(double[] stack,
                                     int stackDepth)
        Description copied from interface: Type2Consumer
        Called when there is vstemhm operator implied by a hintmask or cntrmask operator.
        Specified by:
        implicit_vstemhm in interface Type2Consumer
      • index

        public void index​(double[] stack,
                          int stackDepth)
        Specified by:
        index in interface Type2Consumer
      • integer

        public void integer​(double[] stack,
                            int stackDepth,
                            int i)
        Specified by:
        integer in interface Type2Consumer
        i - the integer which is pushed on the stack by an integer operator.
      • mul

        public void mul​(double[] stack,
                        int stackDepth)
        Specified by:
        mul in interface Type2Consumer
      • neg

        public void neg​(double[] stack,
                        int stackDepth)
        Specified by:
        neg in interface Type2Consumer
      • not

        public void not​(double[] stack,
                        int stackDepth)
        Specified by:
        not in interface Type2Consumer
      • or

        public void or​(double[] stack,
                       int stackDepth)
        Specified by:
        or in interface Type2Consumer
      • put

        public void put​(double[] stack,
                        int stackDepth)
        Specified by:
        put in interface Type2Consumer
      • random

        public void random​(double[] stack,
                           int stackDepth)
        Specified by:
        random in interface Type2Consumer
      • rcurveline

        public void rcurveline​(double[] stack,
                               int stackDepth)
        Specified by:
        rcurveline in interface Type2Consumer
      • return_op

        public void return_op​(double[] stack,
                              int stackDepth)
        Specified by:
        return_op in interface Type2Consumer
      • rlinecurve

        public void rlinecurve​(double[] stack,
                               int stackDepth)
        Specified by:
        rlinecurve in interface Type2Consumer
      • rlineto

        public void rlineto​(double[] stack,
                            int stackDepth)
        Specified by:
        rlineto in interface Type2Consumer
      • rmoveto

        public void rmoveto​(double[] stack,
                            int stackDepth)
        Specified by:
        rmoveto in interface Type2Consumer
      • roll

        public void roll​(double[] stack,
                         int stackDepth)
        Specified by:
        roll in interface Type2Consumer
      • rrcurveto

        public void rrcurveto​(double[] stack,
                              int stackDepth)
        Specified by:
        rrcurveto in interface Type2Consumer
      • sqrt

        public void sqrt​(double[] stack,
                         int stackDepth)
        Specified by:
        sqrt in interface Type2Consumer
      • sub

        public void sub​(double[] stack,
                        int stackDepth)
        Specified by:
        sub in interface Type2Consumer
      • vhcurveto

        public void vhcurveto​(double[] stack,
                              int stackDepth)
        Specified by:
        vhcurveto in interface Type2Consumer
      • vlineto

        public void vlineto​(double[] stack,
                            int stackDepth)
        Specified by:
        vlineto in interface Type2Consumer
      • vmoveto

        public void vmoveto​(double[] stack,
                            int stackDepth)
        Specified by:
        vmoveto in interface Type2Consumer
      • vstem

        public void vstem​(double[] stack,
                          int stackDepth)
        Specified by:
        vstem in interface Type2Consumer
      • vstemhm

        public void vstemhm​(double[] stack,
                            int stackDepth)
        Specified by:
        vstemhm in interface Type2Consumer
      • vvcurveto

        public void vvcurveto​(double[] stack,
                              int stackDepth)
        Specified by:
        vvcurveto in interface Type2Consumer
      • width

        public boolean width​(double w)
        Specified by:
        width in interface Type2Consumer
        Parameters:
        w - the width recorded in the charstring, to be added to the nominal width of the font; if this method is not called, the width of this outline is the default width of the font.
        Returns:
        true iff parsing should continue
      • seac

        public boolean seac​(double[] stack,
                            int stackDepth)
        Specified by:
        seac in interface Type2Consumer
        Parameters:
        stack - the stack containing the following params: Optionally, the advance width. If the stackDepth is 5, the first element on the stack is the width. adx: the horizontal position of the accent character relative to the base character's origin. ady: the vertical position of the accent character relative to the base character's origin. bchar: the character code of the base character in Standard Encoding. achar: the character code of the accent character in Standard Encoding.
        Returns:
        true if the parser should parse the base and accent characters. false if parsing should not recurse into those characters.
      • globalColorMe

        public void globalColorMe​(double[] stack,
                                  int stackDepth)
        Specified by:
        globalColorMe in interface Type2Consumer