Package org.xhtmlrenderer.render

Examples of org.xhtmlrenderer.render.LineMetricsAdapter


        this.level = level;
    }

    public FSFontMetrics getFSFontMetrics(FontContext fc, FSFont font, String string ) {
        Graphics2D graphics = ((Java2DFontContext)fc).getGraphics();
        return new LineMetricsAdapter(
                ((AWTFSFont)font).getAWTFont().getLineMetrics(
                        string, graphics.getFontRenderContext()));
    }
View Full Code Here


    public FSFontMetrics getFSFontMetrics(
            FontContext fontContext, FSFont font, String string ) {
        Java2DFontContext fc = (Java2DFontContext)fontContext;
        Font awtFont = ((AWTFSFont)font).getAWTFont();
        return new LineMetricsAdapter(
                renderer.getLineMetrics(fc.getGraphics(), awtFont, string));
    }
View Full Code Here

    public FSFontMetrics getFSFontMetrics(FontContext fc, FSFont font, String string ) {
        Object fracHint = null;
        Graphics2D graphics = ((Java2DFontContext)fc).getGraphics();
        fracHint = graphics.getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS);
        graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fractionalFontMetricsHint);
        LineMetricsAdapter adapter = new LineMetricsAdapter(
                ((AWTFSFont)font).getAWTFont().getLineMetrics(
                        string, graphics.getFontRenderContext()));
        graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, fracHint);
        return adapter;
    }
View Full Code Here

    public void setSmoothingLevel( int level ) { /* no-op */ }

    public FSFontMetrics getFSFontMetrics(FontContext fc, FSFont font, String string ) {
        Graphics2D graphics = ((Java2DFontContext)fc).getGraphics();
        return new LineMetricsAdapter(
                ((AWTFSFont)font).getAWTFont().getLineMetrics(
                        string, graphics.getFontRenderContext()));
    }
View Full Code Here

TOP

Related Classes of org.xhtmlrenderer.render.LineMetricsAdapter

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.