e654. 获得文本的缩略图
Shape getTextShape(Graphics2D g2d, String str, Font font) {
FontRenderContext frc = g2d.getFontRenderContext();
TextLayout tl = new TextLayout(str, font, frc);
return tl.getOutline(null);
}
| Related Examples |
浙公网安备 33010602011771号