extracted _drawPattern
only draw a pattern if the Path is actually closed