String onValue = getValue(e);
float width = outputDevice.getDeviceLength(fieldElem.getWidth());
float height = outputDevice.getDeviceLength(fieldElem.getHeight());
PdfFormField field = PdfFormField.createEmpty(writer);
FSColor color = box.getStyle().getColor();
FSColor darker = box.getEffBackgroundColor(c).darkenColor();
createAppearances(cb, field, onValue, width, height, true, color, darker);
createAppearances(cb, field, onValue, width, height, false, color, darker);
field.setWidget(
outputDevice.createTargetArea(c, box),
PdfAnnotation.HIGHLIGHT_INVERT);
// XXX createTargetArea already looks up the page, but hopefully a document
// won't have enough radio buttons to matter
Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c);
PageBox page = c.getRootLayer().getPage(c, bounds.y);
field.setPlaceInPage(page.getPageNo()+1);
field.setBorderStyle(new PdfBorderDictionary(0.0f, 0));
field.setAppearanceState(fieldElem == checked ? onValue : OFF_STATE);
if (isReadOnly(e)) {
field.setFieldFlags(PdfFormField.FF_READ_ONLY);
}
group.addKid(field);
}