Package java.awt.geom

Examples of java.awt.geom.AffineTransform.preConcatenate()


           
        } else {
           
            // Need to translate the image to the x, y coordinate to
            // have the same behavior as the <use> element
            at.preConcatenate(AffineTransform.getTranslateInstance
                              (primitiveRegion.getX(), primitiveRegion.getY()));
        }

        return new AffineRable8Bit(filter, at);
    }
View Full Code Here


        double positions[] = new double[len*2];
        int count = 0;
       
        AffineTransform at = new AffineTransform(fontAT);
        at.getMatrix(fontMatrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));

        if (((gv.getLayoutFlags() & GlyphVector.FLAG_HAS_TRANSFORMS) != 0)){

            for (int i=0; i < gv.getNumGlyphs(); i++){

View Full Code Here

        double matrix[] = new double[6];
        double fontMatrix[] = new double[6];

        AffineTransform at = new AffineTransform(fontAT);
        at.getMatrix(fontMatrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
       
        for (int i=0; i < len; i++){
            Glyph gl = ((CommonGlyphVector)gv).vector[i];

            if (gl.getPointWidth() ==0){
View Full Code Here

                xPos += advance;
                count++;
            }
        }

        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
        at.transform(positions, 0, positions, 0, count);

        int status = NativeFont.gdiPlusDrawDriverChars(graphicsInfo,
                chars,
                count,
View Full Code Here

        double positions[] = new double[len*2];
        double matrix[] = new double[6];
       
        AffineTransform at = new AffineTransform(fnt.getTransform());
        at.getMatrix(matrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));

        float xPos = 0;
        float yPos = 0;
      
        int count = 0;
View Full Code Here

        long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();

        double matrix[] = new double[6];
        AffineTransform at = new AffineTransform(g.getFont().getTransform());
        at.getMatrix(matrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));

        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
       
View Full Code Here

            if (coordSystemType == SVGUtilities.OBJECT_BOUNDING_BOX) {
                at = SVGUtilities.toObjectBBox(at, filteredNode);
            }

            Rectangle2D bounds = filteredNode.getGeometryBounds();
            at.preConcatenate(AffineTransform.getTranslateInstance
                              (primitiveRegion.getX() - bounds.getX(),
                               primitiveRegion.getY() - bounds.getY()));
           
        } else {
           
View Full Code Here

        float w = (float)bounds.getWidth();
        float h = (float)bounds.getHeight();

        AffineTransform at
            = ViewBox.getPreserveAspectRatioTransform(e, vb, w, h);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
        node.setTransform(at);

        // 'overflow' and 'clip'
        Shape clip = null;
        if (CSSUtilities.convertOverflow(e)) { // overflow:hidden
View Full Code Here

        s = e.getAttributeNS(null, SVG_TRANSFORM_ATTRIBUTE);
        AffineTransform at = AffineTransform.getTranslateInstance(x, y);

        // 'transform'
        if (s.length() != 0) {
            at.preConcatenate
                (SVGUtilities.convertTransform(e, SVG_TRANSFORM_ATTRIBUTE, s));
        }
        gn.setTransform(at);

        // set an affine transform to take into account the (x, y)
View Full Code Here

    public AffineTransform getGlobalTransform(){
        AffineTransform ctm = new AffineTransform();
        GraphicsNode node = this;
        while (node != null) {
            if(node.getTransform() != null){
                ctm.preConcatenate(node.getTransform());
            }
            node = node.getParent();
        }
        return ctm;
    }
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.