Package com.jgraph.gaeawt.java.awt.geom

Examples of com.jgraph.gaeawt.java.awt.geom.AffineTransform


        }

        GeneralPath gp = (GeneralPath)((GeneralPath)gvShapes[glyphIndex]).clone();

        /* Applying GlyphVector font transform */
        AffineTransform at = (AffineTransform)this.transform.clone();

        /* Applying Glyph transform */
        AffineTransform glyphAT = getGlyphTransform(glyphIndex);
        if (glyphAT != null){
            at.preConcatenate(glyphAT);
        }

        int idx  = glyphIndex << 1;
View Full Code Here


                    eq = (((CommonGlyphVector)glyphVector).visualPositions[idx] == this.visualPositions[idx]) &&
                        (((CommonGlyphVector)glyphVector).visualPositions[idx+1] == this.visualPositions[idx+1]) &&
                        (glyphVector.getGlyphCharIndex(i) == this.getGlyphCharIndex(i));

                    if (eq){
                        AffineTransform trans = glyphVector.getGlyphTransform(i);
                        if (trans == null){
                            eq = (this.glsTransforms[i] == null);
                        }else{
                            eq = this.glsTransforms[i].equals(trans);
                        }
View Full Code Here

        gp.lineTo(0, descent);
        gp.lineTo(0, -ascent - leading);
        gp.closePath();

        /* Applying GlyphVector font transform */
        AffineTransform at = (AffineTransform)this.transform.clone();

        /* Applying Glyph transform */
        AffineTransform glyphTransform = getGlyphTransform(glyphIndex);
        if (glyphTransform != null){
            at.concatenate(glyphTransform);
        }

        /* Applying translation to actual visual bounds */
 
View Full Code Here

        if (transform == null) {
            // awt.94=transform can not be null
            throw new IllegalArgumentException(Messages.getString("awt.94")); //$NON-NLS-1$
        }
        if (!transform.isIdentity()){
            this.fTransform = new AffineTransform(transform);
        }
    }
View Full Code Here

        }
    }

    public AffineTransform getTransform() {
        if (fTransform != null){
            return new AffineTransform(fTransform);
        }
        return new AffineTransform();
    }
View Full Code Here

        final int TRANSFORM_MASK = AffineTransform.TYPE_GENERAL_ROTATION
                | AffineTransform.TYPE_GENERAL_TRANSFORM;
        Rectangle2D bounds;

        AffineTransform transform = getTransform();
        AffineTransform frcTransform = frc.getTransform();

        // XXX: for transforms where an angle between basis vectors is not 90
        // degrees Rectanlge2D class doesn't fit as Logical bounds.
        if ((transform.getType() & TRANSFORM_MASK) == 0) {
            int width = 0;
            for (int i = start; i < end; i++) {
                width += peer.charWidth(chars[i]);
            }
            LineMetrics nlm = peer.getLineMetrics();
            bounds = transform.createTransformedShape(
                    new Rectangle2D.Float(0, -nlm.getAscent(), width, nlm
                            .getHeight())).getBounds2D();
        } else {
            int len = end - start;
            char[] subChars = new char[len];
            System.arraycopy(chars, start, subChars, 0, len);
            bounds = createGlyphVector(frc, subChars).getLogicalBounds();
        }
       
        if (!(frcTransform.isIdentity()))
            return frcTransform.createTransformedShape(bounds).getBounds2D();
       
        return bounds;
    }
View Full Code Here

        }

        FontPeerImpl peer = (FontPeerImpl)this.getPeer();

        Rectangle2D bounds = peer.getMaxCharBounds(frc);
        AffineTransform transform = getTransform();
        // !! Documentation doesn't describe meaning of max char bounds
        // for the fonts that have rotate transforms. For all transforms
        // returned bounds are the bounds of transformed maxCharBounds
        // Rectangle2D that corresponds to the font with identity transform.
        // TODO: resolve this issue to return correct bounds
        bounds = transform.createTransformedShape(bounds).getBounds2D();

        return bounds;
    }
View Full Code Here

        if (transform != null) {
            if (transform instanceof TransformAttribute) {
                return ((TransformAttribute) transform).getTransform();
            }
            if (transform instanceof AffineTransform) {
                return new AffineTransform((AffineTransform) transform);
            }
        } else {
            transform = new AffineTransform();
        }
        return (AffineTransform) transform;

    }
View Full Code Here

        }

        double sx = (double)w/getWidth();
        double sy = (double)h/getHeight();

        AffineTransform at = AffineTransform.getScaleInstance(sx, sy);
        RenderContext context = new RenderContext(at, hints);
        return createRendering(context);
    }
View Full Code Here

    public ParameterBlock getParameterBlock() {
        return paramBlock;
    }

    public RenderedImage createDefaultRendering() {
        AffineTransform at = new AffineTransform();
        RenderContext context = new RenderContext(at);
        return createRendering(context);
    }
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.geom.AffineTransform

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.