cb.circle(center.getX(), -center.getY(), node.getRadius());
cb.fillStroke();
}
public void renderNodeLabel(NodeLabel label) {
Point p = label.getPosition();
Font font = label.getFont();
setFillColor(label.getColor());
try {
BaseFont bf = genBaseFont(font);
float ascent = bf.getAscentPoint(label.getValue(), font.getSize());
float descent = bf.getDescentPoint(label.getValue(), font.getSize());
float textHeight = (ascent - descent) / 2f;
cb.beginText();
cb.setFontAndSize(bf, font.getSize());
cb.showTextAligned(PdfContentByte.ALIGN_CENTER, label.getValue(), p.getX(), -p.getY() - textHeight, 0);
cb.endText();
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
}
}