Rectangle2D area = labelItem.getTextStyle().getGraphicDimensions();
// center the graphics on the labels back
Rectangle2D shieldBounds;
// handle the image resizing and margins
int[] margin = labelItem.getGraphicMargin();
GraphicResize mode = labelItem.getGraphicsResize();
if (mode == GraphicResize.STRETCH) {
// it's really the label bounds + margin
shieldBounds = applyMargins(margin, bounds);
} else if (mode == GraphicResize.PROPORTIONAL) {
// the shield will be inflated in proportion to its size