if (resize)
{
int iconSize = Math.min(w, h);
iconRect = new Rectangle(box.x + box.width / 2 - iconSize / 2, box.y + box.height / 2 - iconSize / 2, iconSize, iconSize);
iconRect.grow(- iconSize / 6, - iconSize / 6);
}
else
{
Image image = ((SimpleImageFigure) iconFigure).getImage();
int iw = image.getWidth(null);