/**
* Computes and returns the stroke
*/
public java.awt.Stroke getStroke() {
Stroke stroke = ls.getStroke();
if (stroke == null) {
return null;
}
// resolve join type into a join code
String joinType;
int joinCode;
joinType = evaluateExpression(stroke.getLineJoin(), feature, "miter");
joinCode = SLDStyleFactory.lookUpJoin(joinType);
// resolve cap type into a cap code
String capType;
int capCode;
capType = evaluateExpression(stroke.getLineCap(), feature, "square");
capCode = SLDStyleFactory.lookUpCap(capType);
// get the other properties needed for the stroke
float[] dashes = stroke.getDashArray();
float width = ((Float) stroke.getWidth().evaluate(feature, Float.class)).floatValue();
float dashOffset = ((Float) stroke.getDashOffset().evaluate(feature, Float.class)).floatValue();
// Simple optimization: let java2d use the fast drawing path if the line width
// is small enough...
if (width <= 1) {
width = 0;