Package java.awt.geom

Examples of java.awt.geom.GeneralPath.transform()


        CMap map = this.cmapTable.getCMap (mapIDs[0], mapIDs[1]);
        int glyphID = map.map (src);
        float advance = (float) this.hmtxTable.getAdvance (glyphID) / (float) this.unitsPerEm;

        float widthfactor = width / advance;
        gp.transform (AffineTransform.getScaleInstance (widthfactor, -1));

        return gp;
    }

    /**
 
View Full Code Here


        parseGlyph (r, gp, pt);

        // restore the start position
        this.pos = hold;

        gp.transform (this.at);

        return gp;
    }

    /**
 
View Full Code Here

        try {
            xformA.concatenate (this.at.createInverse ());
        } catch (NoninvertibleTransformException nte) {
            // oh well ...
        }
        pathA.transform (xformA);

        GeneralPath pathB = getOutline (b, getWidth (b, null));

        try {
            AffineTransform xformB = this.at.createInverse ();
View Full Code Here

        GeneralPath pathB = getOutline (b, getWidth (b, null));

        try {
            AffineTransform xformB = this.at.createInverse ();
            pathB.transform (xformB);
        } catch (NoninvertibleTransformException nte) {
            // ignore
        }

        gp.append (pathB, false);
View Full Code Here

        // the base transform scales the glyph to 1x1
        AffineTransform at = AffineTransform.getScaleInstance (1 / this.unitsPerEm,
                1 / this.unitsPerEm);
        at.concatenate (AffineTransform.getScaleInstance (widthfactor, 1));

        gp.transform (at);

        return gp;
    }

    /**
 
View Full Code Here

            // multiply the translations by units per em
            double[] matrix = g.getTransform (i);

            // transform the path
            path.transform (new AffineTransform (matrix));

            // add it to the global path
            gp.append (path, false);
        }
View Full Code Here

            //apply CTM alterations
            if( current_path != null ){

                //transform
                current_path.transform( CTM_transform );
                //if(CTM[0][0]==0 && CTM[1][1]==0 && CTM[0][1]<0 && CTM[1][0]>0){
                //    current_path.transform(AffineTransform.getTranslateInstance(0,current_path.getBounds().height/CTM[0][1]));
                //System.out.println("transforms "+CTM_transform+" "+current_path.getBounds());
                //}                   
            }else if( current_area != null )
View Full Code Here

            dstShape.append(tlc.getOutline(locs[n], locs[n+1]), false);
        }

        if (tx != null) {
            dstShape.transform(tx);
        }
        return dstShape;
    }

    public int hashCode() {
View Full Code Here

                glyphIndex = getChar2Glyph()[i];
                result.append(getGlyphVector().getGlyphVisualBounds(glyphIndex), false);
            }

            // Shift to the segment's coordinates
            result.transform(AffineTransform.getTranslateInstance(x, y));

            return result;
        }

        /**
 
View Full Code Here

            at.translate(visualPositions[idx], visualPositions[idx+1]);
            return(at.createTransformedShape(blackBox));
        }

        GeneralPath shape = (GeneralPath)this.getGlyphOutline(glyphIndex);
        shape.transform(at);
        return shape.getBounds2D();
    }

    /**
     * Returnes the pixel bounds of the specified glyph within GlyphVector
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.