Package org.jpedal.utils.repositories

Examples of org.jpedal.utils.repositories.Vector_Path


     * @see org.jpedal.fonts.GlyphFactory#getGlyph()
     */
    public PdfGlyph getGlyph(boolean debug) {
       
        //initialise cache
        Vector_Path cached_current_path=new Vector_Path(100);
       
        //create the shape - we have to do it this way
        //because we get the WINDING RULE last and we need it
        //to initialise the shape
        GeneralPath current_path =new GeneralPath(GeneralPath.WIND_NON_ZERO);
        current_path.moveTo(0,0);
        //init points
        float[] x = shape_primitive_x.get();
        float[] y = shape_primitive_y.get();
        float[] x2 = shape_primitive_x2.get();
        float[] y2 = shape_primitive_y2.get();
        float[] x3 = shape_primitive_x3.get();
        float[] y3 = shape_primitive_y3.get();
        int i = 0;
        int end = shape_primitives.size() - 1;
        int[] commands=shape_primitives.get();
       
       
        //loop through commands and add to glyph
        while( i < end )
        {
           
            //System.out.println(i+" "+x+" "+y);
            if( commands[i] == L ){
                current_path.lineTo(x[i],y[i]-ymin);
            }else if( commands[i] == H ){
                current_path.closePath();

                //save for later use
                cached_current_path.addElement(current_path);
               
                current_path=new GeneralPath(GeneralPath.WIND_NON_ZERO);
                current_path.moveTo(0,0);
            }else if( commands[i] == M ){
                current_path.moveTo( x[i], y[i]-ymin);
View Full Code Here

TOP

Related Classes of org.jpedal.utils.repositories.Vector_Path

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.