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

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


        int status = 0;

        long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();
        Font fnt =  gv.getFont();
        int len = gv.getNumGlyphs();
        CompositeFont wcf = (CompositeFont)(fnt.getPeer());
        int charFontIndex = wcf.getCharFontIndex(((CommonGlyphVector)gv).charVector[0], 0);
        int fontIndex = charFontIndex;

        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
        int count = 0;
        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
       
        long font = physFont.getFontHandle();

        AffineTransform fontAT = fnt.getTransform();

        double matrix[] = new double[6];
        double fontMatrix[] = new double[6];

        AffineTransform at = new AffineTransform(fontAT);
        at.getMatrix(fontMatrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
       
        for (int i=0; i < len; i++){
            Glyph gl = ((CommonGlyphVector)gv).vector[i];

            if (gl.getPointWidth() ==0){
                continue;
            }
           
            char c = gl.getChar();
            AffineTransform glyphAT = gv.getGlyphTransform(i);
            Point2D pos = gv.getGlyphPosition(i);
           
            fontIndex = wcf.getCharFontIndex(c, 0);

            if ((glyphAT == null) ||
                    glyphAT.isIdentity() ||
                    glyphAT.getType() == AffineTransform.TYPE_TRANSLATION){
                if (fontIndex != charFontIndex) {
View Full Code Here


        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
       
        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        int charFontIndex = wcf.getCharFontIndex(str.charAt(0), 0);
        int fontIndex = charFontIndex;

        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
       
        long font = physFont.getFontHandle();
        float yPos = 0;    // Y position to draw (y - font.ascent)
        float xPos = 0;    // X position to draw
        int count = 0;

       
        for (int i=0; i < len; i++){
            Glyph gl = wcf.getGlyph(str.charAt(i));

            int advance = (int)(gl.getGlyphPointMetrics().getAdvance());
            if (advance ==0){
                continue;
            }
            char c = gl.getChar();

            fontIndex = wcf.getCharFontIndex(c, 0);
           
            if (fontIndex != charFontIndex) {
                charFontIndex = fontIndex;
               
                at.transform(positions, 0, positions, 0, count);
View Full Code Here

        long colormap = x11.XDefaultColormap(display, screen);

        X11.XColor xcolor = getXColor(g.getColor());
        long xcolorPtr = xcolor.lock();
       
        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        long font = 0;
        int xOffset = (int)Math.round(x);    // X offset to draw
        int yOffset = (int)Math.round(y);    // Y offset to draw
        int offs = 0;       // width of substring with the same font header
        String sChars = new String();
        char chars[];
        for (int i=0; i < str.length(); i++){
            char c = str.charAt(i);
            Glyph gl = wcf.getGlyph(c);
            if (font == 0){
                font = gl.getPFont();
            }
            int glWidth = Math.round(gl.getGlyphPointMetrics().getAdvance());
            if (glWidth ==0){
View Full Code Here

        int status = 0;

        long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();
        Font fnt =  gv.getFont();
        int len = gv.getNumGlyphs();
        CompositeFont wcf = (CompositeFont)(fnt.getPeer());
        int charFontIndex = wcf.getCharFontIndex(((CommonGlyphVector)gv).charVector[0], 0);
        int fontIndex = charFontIndex;

        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
        int count = 0;
        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
       
        long font = physFont.getFontHandle();

        AffineTransform fontAT = fnt.getTransform();

        double matrix[] = new double[6];
        double fontMatrix[] = new double[6];

        AffineTransform at = new AffineTransform(fontAT);
        at.getMatrix(fontMatrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
       
        for (int i=0; i < len; i++){
            Glyph gl = ((CommonGlyphVector)gv).vector[i];

            if (gl.getPointWidth() ==0){
                continue;
            }
           
            char c = gl.getChar();
            AffineTransform glyphAT = gv.getGlyphTransform(i);
            Point2D pos = gv.getGlyphPosition(i);
           
            fontIndex = wcf.getCharFontIndex(c, 0);

            if ((glyphAT == null) ||
                    glyphAT.isIdentity() ||
                    glyphAT.getType() == AffineTransform.TYPE_TRANSLATION){
                if (fontIndex != charFontIndex) {
View Full Code Here

        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
       
        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        int charFontIndex = wcf.getCharFontIndex(str.charAt(0), 0);
        int fontIndex = charFontIndex;

        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
       
        long font = physFont.getFontHandle();
        float yPos = 0;    // Y position to draw (y - font.ascent)
        float xPos = 0;    // X position to draw
        int count = 0;

       
        for (int i=0; i < len; i++){
            Glyph gl = wcf.getGlyph(str.charAt(i));

            int advance = (int)(gl.getGlyphPointMetrics().getAdvance());
            if (advance ==0){
                continue;
            }
            char c = gl.getChar();

            fontIndex = wcf.getCharFontIndex(c, 0);
           
            if (fontIndex != charFontIndex) {
                charFontIndex = fontIndex;
               
                at.transform(positions, 0, positions, 0, count);
View Full Code Here

        y += (int)Math.round(trans.getTranslateY());

        win32.SetTextColor(hdc, getGDIColor(g.getColor().getRGB()));
        win32.SetBkMode(hdc, WindowsDefs.TRANSPARENT);

        CompositeFont cf = (CompositeFont)gv.getFont().getPeer();

        int ascent = cf.getAscent();

        long font = 0;

        for (int i=0; i < gv.getNumGlyphs(); i++){
            Glyph gl = ((CommonGlyphVector)gv).vector[i];
View Full Code Here

        y += (int)Math.round(trans.getTranslateY());
       
        win32.SetTextColor(hdc, getGDIColor(g.getColor().getRGB()));
        win32.SetBkMode(hdc, WindowsDefs.TRANSPARENT);

        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        int charFontIndex = wcf.getCharFontIndex(str.charAt(0), 0);
        int fontIndex = charFontIndex;

        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
        long font = physFont.getFontHandle();

        win32.SelectObject(hdc, font);

        int ascent = physFont.getAscent(); // Font ascent
        int offs = 0;       // width of substring with the same font header
        int yOffset = y - ascent; // Y offset to draw (y - font.ascent)
        int xOffset = x;    // X offset to draw
        int start = 0;
        int count = 0;
       
        for (int i=0; i < len; i++){
            char c = str.charAt(i);
            Glyph gl = wcf.getGlyph(c);

            int glWidth = Math.round(gl.getGlyphPointMetrics().getAdvance());
            if (glWidth ==0){
                continue;
            }

            fontIndex = wcf.getCharFontIndex(c, 0);
           
            if (fontIndex != charFontIndex){
                charFontIndex = fontIndex;
                win32.TextOutW(hdc, xOffset, yOffset,
                        str.substring(start, start + count), count);
View Full Code Here

        long colormap = x11.XDefaultColormap(display, screen);

        X11.XColor xcolor = getXColor(g.getColor());
        long xcolorPtr = xcolor.lock();
       
        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        long font = 0;
        int xOffset = (int)Math.round(x);    // X offset to draw
        int yOffset = (int)Math.round(y);    // Y offset to draw
        int offs = 0;       // width of substring with the same font header
        String sChars = new String();
        char chars[];
        for (int i=0; i < str.length(); i++){
            char c = str.charAt(i);
            Glyph gl = wcf.getGlyph(c);
            if (font == 0){
                font = gl.getPFont();
            }
            int glWidth = Math.round(gl.getGlyphPointMetrics().getAdvance());
            if (glWidth ==0){
View Full Code Here

        long colormap = x11.XDefaultColormap(display, screen);

        X11.XColor xcolor = getXColor(g.getColor());
        long xcolorPtr = xcolor.lock();
       
        CompositeFont wcf = (CompositeFont)(g.getFont().getPeer());
        long font = 0;
        int xOffset = (int)Math.round(x);    // X offset to draw
        int yOffset = (int)Math.round(y);    // Y offset to draw
        int offs = 0;       // width of substring with the same font header
        String sChars = new String();
        char chars[];
        for (int i=0; i < str.length(); i++){
            char c = str.charAt(i);
            Glyph gl = wcf.getGlyph(c);
            if (font == 0){
                font = gl.getPFont();
            }
            int glWidth = Math.round(gl.getGlyphPointMetrics().getAdvance());
            if (glWidth ==0){
View Full Code Here

        int status = 0;

        long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();
        Font fnt =  gv.getFont();
        int len = gv.getNumGlyphs();
        CompositeFont wcf = (CompositeFont)(fnt.getPeer());
        int charFontIndex = wcf.getCharFontIndex(((CommonGlyphVector)gv).charVector[0], 0);
        int fontIndex = charFontIndex;

        int size = len;
        double positions[] = new double[size*2];
        char chars[] = new char[size];
        int count = 0;
        WindowsFont physFont = (WindowsFont)wcf.fPhysicalFonts[charFontIndex];
       
        long font = physFont.getFontHandle();

        AffineTransform fontAT = fnt.getTransform();

        double matrix[] = new double[6];
        double fontMatrix[] = new double[6];

        AffineTransform at = new AffineTransform(fontAT);
        at.getMatrix(fontMatrix);
        at.preConcatenate(AffineTransform.getTranslateInstance(x, y));
       
        for (int i=0; i < len; i++){
            Glyph gl = ((CommonGlyphVector)gv).vector[i];

            if (gl.getPointWidth() ==0){
                continue;
            }
           
            char c = gl.getChar();
            AffineTransform glyphAT = gv.getGlyphTransform(i);
            Point2D pos = gv.getGlyphPosition(i);
           
            fontIndex = wcf.getCharFontIndex(c, 0);

            if ((glyphAT == null) ||
                    glyphAT.isIdentity() ||
                    glyphAT.getType() == AffineTransform.TYPE_TRANSLATION){
                if (fontIndex != charFontIndex) {
View Full Code Here

TOP

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

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.