Package java.awt

Examples of java.awt.Font.createGlyphVector()


            final Font font = tcctx.font;
            final char[] chars = tcctx.chars;
            final FontRenderContext frc = tcctx.frc;
            GlyphVector gv;
            do {
                gv = font.createGlyphVector(frc, chars);
            } while (--numReps >= 0);
        }
    }

    public static class GVFromFontCI extends TextConstructionTests {
View Full Code Here


            final Font font = tcctx.font;
            final CharacterIterator ci = tcctx.ci;
            final FontRenderContext frc = tcctx.frc;
            GlyphVector gv;
            do {
                gv = font.createGlyphVector(frc, ci);
            } while (--numReps >= 0);
        }
    }

    public static class GVFromFontGlyphs extends TextConstructionTests {
View Full Code Here

            final Font font = tcctx.font;
            final int[] glyphs = tcctx.glyphs;
            final FontRenderContext frc = tcctx.frc;
            GlyphVector gv;
            do {
                gv = font.createGlyphVector(frc, glyphs);
            } while (--numReps >= 0);
        }
    }

    public static class GVFromFontLayout extends TextConstructionTests {
View Full Code Here

       
        try {
            fontAT.inverseTransform(new Point.Double(x + fontAT.getTranslateX(), y + fontAT.getTranslateY()), pos);
        } catch (NoninvertibleTransformException e) {  
//          TODO determinant equals 0 => point or line
            g.fill(font.createGlyphVector(g.getFontRenderContext(), str).getOutline(x, y));
            return;
        }
       
        fontAT.translate(pos.x,pos.y);
        g.transform(fontAT);
View Full Code Here

       
        try {
            fontAT.inverseTransform(new Point.Double(x + fontAT.getTranslateX(), y + fontAT.getTranslateY()), pos);
        } catch (NoninvertibleTransformException e) {  
//          TODO determinant equals 0 => point or line
            g.fill(font.createGlyphVector(g.getFontRenderContext(), str).getOutline(x, y));
            return;
        }
       
        fontAT.translate(pos.x,pos.y);
        g.transform(fontAT);
View Full Code Here

       
        try {
            fontAT.inverseTransform(new Point.Double(x + fontAT.getTranslateX(), y + fontAT.getTranslateY()), pos);
        } catch (NoninvertibleTransformException e) {  
//          TODO determinant equals 0 => point or line
            g.fill(font.createGlyphVector(g.getFontRenderContext(), str).getOutline(x, y));
            return;
        }
       
        fontAT.translate(pos.x,pos.y);
        g.transform(fontAT);
View Full Code Here

    return shapeSet.size();
  }
 
  public static Shape getShape(String character, FontRenderContext frc) {
    Font font = Font.decode(Font.MONOSPACED).deriveFont(Font.BOLD, 18)
    Shape shape = font.createGlyphVector(frc, character).getGlyphOutline(0);
    Rectangle bounds = shape.getBounds();
    shape = AffineTransform.getTranslateInstance(-bounds.width / (double) 2, bounds.height / (double) 2).createTransformedShape(shape);
    return shape;
  }
}
View Full Code Here

    return shapeSet.size();
  }
 
  public static Shape getShape(String character, FontRenderContext frc) {
    Font font = PlotLineGlobalConfiguration.getMarkerFont();
    Shape shape = font.createGlyphVector(frc, character).getGlyphOutline(0);
    Rectangle bounds = shape.getBounds();
    shape = AffineTransform.getTranslateInstance(-bounds.width / (double) 2, bounds.height / (double) 2).createTransformedShape(shape);
    return shape;
  }
}
View Full Code Here

    return shapeSet.size();
  }
 
  public static Shape getShape(String character, FontRenderContext frc) {
    Font font = PlotLineGlobalConfiguration.getMarkerFont();
    Shape shape = font.createGlyphVector(frc, character).getGlyphOutline(0);
    Rectangle bounds = shape.getBounds();
    shape = AffineTransform.getTranslateInstance(-bounds.width / (double) 2, bounds.height / (double) 2).createTransformedShape(shape);
    return shape;
  }
}
View Full Code Here

                                             SVG_MISSING_GLYPH_TAG);

            int[] missingGlyphCode = new int[1];
            missingGlyphCode[0] = commonSizeFont.getMissingGlyphCode();
            GlyphVector gv;
            gv = commonSizeFont.createGlyphVector(localFRC, missingGlyphCode);
            Shape missingGlyphShape = gv.getGlyphOutline(0);
            GlyphMetrics gm = gv.getGlyphMetrics(0);

            // need to turn the missing glyph upside down to be in the font
            // coordinate system (i.e Y axis up)
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.