Examples of GlyphRenderer


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

                // get the index for the needed glyph
                final char ch = text.charAt(i);
                final int index = encTable.getTableFormat().getGlyphIndex(ch);
                if (ch != ' ') {
                    final Glyph g = glyphTable.getGlyph(index);
                    final GlyphRenderer renderer = renderCache.getRenderer(g,
                        ascent);
                    final Dimension d;
                    d = renderer.createGlyphRaster(alphaRaster, fontSize);

                    final Point2D minLoc = renderer.getMinLocation(fontSize);
                    final int dstX = x + (int) minLoc.getX();
                    final int dstY = y - d.height + (int) minLoc.getY();

                    surface.drawAlphaRaster(alphaRaster, tx, 0, 0, dstX, dstY,
                        d.width, d.height, color);
View Full Code Here

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

            final WritableRaster alphaRaster = createAlphaRaster();
            for (int i = 0; i < textLength; i++) {
                final char ch = text.charAt(i);
                if (ch != ' ') {
                    final Glyph g = fontData.getGlyph(ch);
                    final GlyphRenderer renderer = renderCache.getRenderer(g,
                        ascent);
                    final Dimension d;
                    d = renderer.createGlyphRaster(alphaRaster, fontSize);

                    final Point2D minLoc = renderer.getMinLocation(fontSize);
                    final int dstX = x + (int) minLoc.getX();
                    final int dstY = y - d.height + (int) minLoc.getY();

                    surface.drawAlphaRaster(alphaRaster, tx, 0, 0, dstX, dstY,
                        d.width, d.height, color);
View Full Code Here

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

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