private static void drawString(Graphics2D g, Font font, String value, float x, float y) {
AttributedString str = new AttributedString(value);
str.addAttribute(TextAttribute.FOREGROUND, Color.BLACK);
str.addAttribute(TextAttribute.FONT, font);
FontRenderContext frc = new FontRenderContext(null, true, true);
TextLayout layout = new LineBreakMeasurer(str.getIterator(), frc).nextLayout(Integer.MAX_VALUE);
layout.draw(g, x, y);
}
GlyphVectorOutline.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录