Use #hasFill() and #hasStroke() more broadly and avoid drawing strokes when strokeWidth is set to 0.