PointSymbolizer pointSymbolizer = (PointSymbolizer) symbolizer;
graphic = pointSymbolizer.getGraphic();
List<ExternalGraphic> externalGraphicsList = externalGraphicsFromGraphic(graphic);
// size
Expression sizeExpr = graphic.getSize();
String tmp = expressionToString(sizeExpr);
if (tmp != null) {
size = tmp;
} else {
size = DEFAULT_WIDTH;
}
// rotation
Expression rotationExpr = graphic.getRotation();
tmp = expressionToString(rotationExpr);
if (tmp != null) {
rotation = tmp;
} else {
rotation = DEFAULT_ROTATION;
}
// offset
Point2D offset = Utilities.getOffset(pointSymbolizer);
if (offset != null) {
xOffset = String.valueOf(offset.getX());
yOffset = String.valueOf(offset.getY());
} else {
xOffset = DEFAULT_OFFSET;
yOffset = DEFAULT_OFFSET;
}
if (externalGraphicsList.size() == 0) {
mark = SLDs.mark(pointSymbolizer);
if (mark == null) {
return;
}
markName = mark.getWellKnownName().evaluate(null, String.class);
if (markName == null || markName.equals("")) { //$NON-NLS-1$
markName = "circle"; //$NON-NLS-1$
mark.setWellKnownName(ff.literal(markName));
}
fill = mark.getFill();
if (fill != null) {
fillColor = fill.getColor().evaluate(null, String.class);
Expression opacityExpr = fill.getOpacity();
fillOpacity = expressionToString(opacityExpr);
hasFill = true;
} else {
hasFill = false;
}
stroke = mark.getStroke();
if (stroke != null) {
Expression color = stroke.getColor();
tmp = color.evaluate(null, String.class);
if (tmp != null) {
strokeColor = tmp;
} else {
strokeColor = DEFAULT_COLOR;
}
Expression opacity = stroke.getOpacity();
tmp = expressionToString(opacity);
if (tmp != null) {
strokeOpacity = tmp;
} else {
strokeOpacity = DEFAULT_OPACITY;
}
Expression width = stroke.getWidth();
tmp = expressionToString(width);
if (tmp != null) {
strokeWidth = tmp;
} else {
strokeWidth = DEFAULT_WIDTH;