Paint fillPaint = convertFillPaint(e, node, ctx);
Paint strokePaint = convertStrokePaint(e, node, ctx);
Shape shape = node.getShape();
if (fillPaint != null && strokePaint != null) {
FillShapePainter fp = new FillShapePainter(shape);
fp.setPaint(fillPaint);
StrokeShapePainter sp = new StrokeShapePainter(shape);
sp.setStroke(PaintServer.convertStroke(e, ctx));
sp.setPaint(strokePaint);
CompositeShapePainter cp = new CompositeShapePainter(shape);
cp.addShapePainter(fp);
cp.addShapePainter(sp);
return cp;
} else if (strokePaint != null) {
StrokeShapePainter sp = new StrokeShapePainter(shape);
sp.setStroke(PaintServer.convertStroke(e, ctx));
sp.setPaint(strokePaint);
return sp;
} else if (fillPaint != null) {
FillShapePainter fp = new FillShapePainter(shape);
fp.setPaint(fillPaint);
return fp;
} else {
return null;
}
}