static int drawThoughtCircleText_margin = 5; static Color drawThoughtCircleText_color = Color.yellow; static void drawThoughtCircleText(BufferedImage bg, BufferedImage img, Pt p, S text) { Graphics2D g = imageGraphics(bg); g.setColor(drawThoughtCircleText_color); g.setFont(sansSerif(20)); FontMetrics fm = g.getFontMetrics(); int y = p.y+thoughtCircleSize(img)/2+drawThoughtCircleText_margin; // g.drawString(text, p.x-fm.stringWidth(text)/2.0f, y+fm.getLeading()+fm.getMaxAscent()); drawTextWithOutline(g, text, p.x-fm.stringWidth(text)/2.0f, y+fm.getLeading()+fm.getMaxAscent(), drawThoughtCircleText_color, Color.black); g.dispose(); }