Examples of FontPeerImpl


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

        }
    }

    @Override
    public FontPeer createPhysicalFontPeer(String name, int style, int size) {
        FontPeerImpl peer = null;       
       
        if (isFontExistInList(name, style)){        
            try {
                peer = new FLFontPeer(name, style, size);
               
                peer.setFamily(name);
            } catch(NullPointerException e) {
                peer = new FLFontPeer(DEFAULT_NAME, style, size);
               
                peer.setFamily(DEFAULT_NAME);
            }
        } else {
            peer = new FLFontPeer(DEFAULT_NAME, style, size);
           
            peer.setFamily(DEFAULT_NAME);
        }
       
        return peer;
    }
View Full Code Here

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

                Enumeration<String> kEnum = fontsTable.keys();

                while(kEnum.hasMoreElements()){
                    Object key = kEnum.nextElement();
                    HashMapReference hmr = fontsTable.get(key);
                    FontPeerImpl delPeer = (FontPeerImpl)hmr.get();
                   
                    if ((delPeer != null) && (delPeer.getClass() != CompositeFont.class)){
                        // there's nothing to dispose in CompositeFont objects
                       
                        delPeer.dispose();
                    }
                }
               
                dispose();
               
View Full Code Here

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

        return this.numGlyphs;
    }

    public int getMissingGlyphCode() {
        if (missingGlyphCode == -1){
            FontPeerImpl peer = (FontPeerImpl)this.getPeer();
            this.missingGlyphCode =  peer.getMissingGlyphCode();
        }
        return this.missingGlyphCode;
    }
View Full Code Here

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

    public float getSize2D() {
        return this.pointSize;
    }

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

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

        }
    }

    @Override
    public FontPeer createPhysicalFontPeer(String name, int style, int size) {
        FontPeerImpl peer = null;       
       
        if (isFontExistInList(name, style)){        
            try {
                peer = new FLFontPeer(name, style, size);
               
                peer.setFamily(name);
            } catch(NullPointerException e) {
                peer = new FLFontPeer(DEFAULT_NAME, style, size);
               
                peer.setFamily(DEFAULT_NAME);
            }
        } else {
            peer = new FLFontPeer(DEFAULT_NAME, style, size);
           
            peer.setFamily(DEFAULT_NAME);
        }
       
        return peer;
    }
View Full Code Here

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

        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

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

        if (frc == null) {
            // awt.00=FontRenderContext is 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

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

        if (frc == null){
            // awt.00=FontRenderContext is 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

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

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

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

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

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

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

        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.
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.