&& sym instanceof LineSymbolizer) {
if (((LineStyle2D) style).getStroke() == null) {
LOGGER.info("Empty LineSymbolizer, using default stroke.");
}
LineSymbolizer lineSym = (LineSymbolizer) sym;
// ** LABEL **
final StringBuffer styleString = new StringBuffer();
styleString.append("<IconStyle>");
if (!vectorNameDescription) { // if they don't want
// attributes
styleString.append("<color>#00ffffff</color>"); // fully
// transparent
}
styleString.append("</IconStyle>");
// ** LINE **
styleString.append("<LineStyle><color>");
if (lineSym.getStroke() != null) {
int opacity = 255;
if (lineSym.getStroke().getOpacity() != null) {
float op = getOpacity(lineSym.getStroke().getOpacity());
opacity = (new Float(255 * op)).intValue();
}
Paint p = ((LineStyle2D) style).getContour();
if (p instanceof Color) {
styleString.append("#").append(intToHex(opacity)).append(
colorToHex((Color) p)); // transparancy needs to
// come from the opacity
// value.
} else {
styleString.append("#ffaaaaaa"); // should not occure in
// normal parsing
}
styleString.append("</color>");
// stroke width
if (lineSym.getStroke().getWidth() != null) {
int width = getWidth(lineSym.getStroke().getWidth());
styleString.append("<width>").append(width).append(
"</width>");
}
} else // no style defined, so use default
{