public static Paint getBackground(Properties props, Paint defPaint) {
boolean transparent = PropUtils.booleanFromProperties(props,
TRANSPARENT,
false);
Paint backgroundColor = PropUtils.parseColorFromProperties(props,
BGCOLOR,
defPaint);
if (backgroundColor == null) {
backgroundColor = Color.white;
}
if (transparent) {
if (backgroundColor instanceof Color) {
Color bgc = (Color) backgroundColor;
backgroundColor = new Color(bgc.getRed(), bgc.getGreen(), bgc.getBlue(), 0x00);
} else {
backgroundColor = OMColor.clear;
}
}
if (Debug.debugging("imageserver")) {
Debug.output("ImageServerUtils.createOMProjection: projection color: "
+ (backgroundColor instanceof Color ? Integer.toHexString(((Color) backgroundColor).getRGB())
: backgroundColor.toString())
+ ", transparent("
+ transparent + ")");
}
return backgroundColor;