Package org.apache.harmony.awt.gl.font

Examples of org.apache.harmony.awt.gl.font.FontPeerImpl


    @SuppressWarnings("deprecation")
    @Override
    public void drawGlyphVector(Graphics2D g, GlyphVector gv, float x,
            float y) {
        FontPeerImpl fnt = (FontPeerImpl)gv.getFont().getPeer();
        if (fnt.getClass() == CompositeFont.class){
            gdipDrawCompositeGlyphVector(g, gv, x, y);
        } else {
            gdipDrawNormalGlyphVector(g, gv, x, y);
        }
    }
View Full Code Here


        int len = str.length();
        if (len == 0){
            return;
        }

        FontPeerImpl fnt = (FontPeerImpl)g.getFont().getPeer();
        if (fnt.getClass() == CompositeFont.class){
            gdipDrawCompositeString(g, str, x, y);
        } else {
            gdipDrawNormalChars(g, g.getFont(), str.toCharArray(), len, x, y);
        }
    }
View Full Code Here

        }
    }


    public boolean canDisplay(char c) {
        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.canDisplay(c);
    }
View Full Code Here

        return 0;
    }


    public String getFamily() {
        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.getFamily();


    }
View Full Code Here

        if (l == null) {
            throw new NullPointerException(Messages.getString(
                    "awt.01", "Locale")); //$NON-NLS-1$
        }

        FontPeerImpl peer = (FontPeerImpl) this.getPeer();
        return peer.getFamily(l);
    }
View Full Code Here

        return getFont(sp, null);
    }


    public String getFontName() {
        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.getFontName();
    }
View Full Code Here

        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.getFontName();
    }

    public String getFontName(Locale l) {
        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.getFontName(l);
    }
View Full Code Here

            FontRenderContext frc) {
        if (frc == null) {
            throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
        }

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

        return peer.getLineMetrics((new String(chars)).substring(start, end),
                frc, this.getTransform());
    }
View Full Code Here

       
        if (frc == null){
            throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
        }
       
        FontPeerImpl peer = (FontPeerImpl)this.getPeer();
        return peer.getLineMetrics(str, frc, getTransform());
    }
View Full Code Here

        if (start > end) {
            throw new IndexOutOfBoundsException("Wrong range length: "
                    + (end - start));
        }

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

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

        AffineTransform transform = 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;
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.gl.font.FontPeerImpl

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.