Package org.jnode.awt.font.renderer

Examples of org.jnode.awt.font.renderer.RenderContext


     * Create/get the alpha raster used for rendering.
     *
     * @return the alpha raster
     */
    protected final WritableRaster createAlphaRaster() {
        final RenderContext ctx = renderCache.getContext();
        WritableRaster r = (WritableRaster) ctx.getObject(ALPHA_RASTER);
        final int fontSizeUp = (int) (fontMetrics.getFont().getSize() + 0.5);
        if ((r == null) || (r.getWidth() < fontSizeUp) || (r.getHeight() < fontSizeUp)) {
            r = GlyphRenderer.createRaster(fontSizeUp, fontSizeUp);
            ctx.setObject(ALPHA_RASTER, r);
            VmUtils.getVm().getCounter(ALPHA_RASTER).inc();
        }
        return r;
    }
View Full Code Here


        frm = new JFrame("GlyphTest - SumAreaTable");
        frm.getContentPane().setBackground(Color.LIGHT_GRAY);

        final String text = "Hello world";
        final RenderContext ctx = new RenderContext();
        final JPanel scale1 = new JPanel(new FlowLayout());
        final JPanel scale3 = new JPanel(new FlowLayout());
        scale1.setOpaque(false);
        scale3.setOpaque(false);
        frm.getContentPane().setLayout(new GridLayout(2, 1));
View Full Code Here

        final HorizontalHeaderTable hheadTable = fdata
            .getHorizontalHeaderTable();
        final double ascent = hheadTable.getAscent();

        Area area = new Area(shape);
        GlyphRenderer gr = new GlyphRenderer(new RenderContext(), area, ascent);
        final WritableRaster r = GlyphRenderer.createRaster(32, 32);
        gr.createGlyphRaster(r, 16);
        return r;
    }
View Full Code Here

TOP

Related Classes of org.jnode.awt.font.renderer.RenderContext

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.