static int drawThoughtCircleText_margin = 5; static Color drawThoughtCircleText_color = Color.yellow; static void drawThoughtCircleText(BufferedImage bg, BufferedImage img, DoublePt p, S text) { Graphics2D g = imageGraphics(bg); g.setFont(sansSerifBold(20)); FontMetrics fm = g.getFontMetrics(); int h = fm.getHeight(); double y = p.y+thoughtCircleSize(img)/2+drawThoughtCircleText_margin; for (S s : lines(text)) { drawTextWithOutline(g, s, (float) (p.x-fm.stringWidth(s)/2), (float) (y+fm.getLeading()+fm.getMaxAscent()), drawThoughtCircleText_color, Color.black); y += h; } g.dispose(); }