if (image == null)
return null;
int adornmentFlags = computeAdornmentFlags(element);
if (adornmentFlags != 0) {
ImageDescriptor baseImage = new ImageImageDescriptor(image);
Rectangle bounds = image.getBounds();
return getRegistry().get(
new ScriptElementImageDescriptor(baseImage, adornmentFlags,
new Point(bounds.width, bounds.height)));
}