Updated drawPolygonsToContext to more closely match Ejecta 1.4.