Package com.google.code.appengine.awt.geom

Examples of com.google.code.appengine.awt.geom.AffineTransform


        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


     * @param frc specified FontRenderContext
     * @param at specified AffineTransform
     */
    @Override
    public LineMetrics getLineMetrics(String str, FontRenderContext frc , AffineTransform at){
        AffineTransform frcAt = null;
        LineMetricsImpl lm = (LineMetricsImpl)(this.nlm.clone());
        lm.setNumChars(str.length());
        if (frc != null)
            frcAt = frc.getTransform();
       
        if ((at != null) && (!at.isIdentity())){
            if (frcAt != null)
                at.concatenate(frcAt);
            lm.scale((float)at.getScaleX(), (float)at.getScaleY());
        } else if ((frcAt != null) && (!frcAt.isIdentity())){
            lm.scale((float)frcAt.getScaleX(), (float)frcAt.getScaleY());
        }

        return lm;
    }
View Full Code Here

            if(w == width && h == height){
                blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                        (AffineTransform) transform.clone(),
                        composite, bgcolor, clip);
            }else{
                AffineTransform xform = new AffineTransform();
                xform.setToScale((float)width / w, (float)height / h);
                blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                        (AffineTransform) transform.clone(),
                        xform, composite, bgcolor, clip);
            }
        }
View Full Code Here

            if(srcW == dstW && srcH == dstH){
                blitter.blit(srcX, srcY, srcSurf, dstX, dstY, dstSurf, srcW, srcH,
                        (AffineTransform) transform.clone(),
                        composite, bgcolor, clip);
            }else{
                AffineTransform xform = new AffineTransform();
                xform.setToScale((float)dstW / srcW, (float)dstH / srcH);
                blitter.blit(srcX, srcY, srcSurf, dstX, dstY, dstSurf, srcW, srcH,
                        (AffineTransform) transform.clone(),
                        xform, composite, bgcolor, clip);
            }
        }
View Full Code Here

     *
     * @param frc specified FontRenderContext
     */
    public Rectangle2D getMaxCharBounds(FontRenderContext frc) {
        if (frc != null){
            AffineTransform at = frc.getTransform();
            return at.createTransformedShape(maxCharBounds).getBounds2D();
        }
        return maxCharBounds;
    }
View Full Code Here

        if(op == null) {
            drawImage(bufImage, x, y, null);
        } else if(op instanceof AffineTransformOp){
            AffineTransformOp atop = (AffineTransformOp) op;
            AffineTransform xform = atop.getTransform();
            Surface srcSurf = Surface.getImageSurface(bufImage);
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                    (AffineTransform) transform.clone(), xform,
View Full Code Here

        }

        if(done || somebits) {
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            AffineTransform xform = (AffineTransform) transform.clone();
            xform.concatenate(trans);
            blitter.blit(0, 0, srcSurf, 0, 0, dstSurf, w, h, xform, composite,
                    null, clip);
        }
        return done;
    }
View Full Code Here

        return Toolkit.getDefaultToolkit().getFontMetrics(font);
    }

    @Override
    public FontRenderContext getFontRenderContext() {
        AffineTransform at;
        if (frc == null){
            GraphicsConfiguration gc = getDeviceConfiguration();
            if (gc != null){
                at = gc.getDefaultTransform();
                at.concatenate(gc.getNormalizingTransform());
            }
            else
                at = null;

            boolean isAa = (hints.get(RenderingHints.KEY_TEXT_ANTIALIASING) ==
View Full Code Here

        copy.setColor(fgColor);
        copy.setPaint(paint);
        copy.setComposite(composite);
        copy.setStroke(stroke);
        copy.setFont(font);
        copy.setTransform(new AffineTransform(transform));
        //copy.origTransform = new AffineTransform(origTransform);
        copy.origPoint = new Point(origPoint);
    }
View Full Code Here

     * @param fnt the specified Font object
     */
    public FontMetricsImpl(Font fnt) {
        super(fnt);
        peer = getFontPeer();
        AffineTransform at = fnt.getTransform();
        if (!at.isIdentity()){
            scaleX = (float)at.getScaleX();
            // scaleY = (float)at.getScaleY();
        }

        LineMetricsImpl lm = (LineMetricsImpl)peer.getLineMetrics("", null, at); //$NON-NLS-1$
       
View Full Code Here

TOP

Related Classes of com.google.code.appengine.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.