Exporting devicePixelRatio
Generalizing createPattern