 <p>It's not possible out of the box. There is however a possible work around -</p> <p>Lets assume the spacing wanted is 0.5 pixel, then you can:</p> <ul> <li>Create a canvas of double size of the pattern image <strong>plus</strong> an extra pixel for spacing.</li> <li>Set the canvas as pattern</li> <li>Scale transform the main canvas, here it would be <code>ctx.scale(0.5, 0.5);</code></li> <li>Set fill style and fill the region with scaled positions (all coordinates must be scaled x2 in this case). For example:<br> If you want to fill the area 10, 10 to 100, 100, you would need to use 20, 20 to 200, 200 etc. dependent on the actual scale and assuming origin isn't translated.</li> </ul> <p>The scaling will force the pattern to sub-pixel so you get the appearance of "decimal lines". Just remember to scale back to original scale afterwards (use save()/restore() for a simple solution to that).</p> <p>If you wanted the gap to be 0.33 then use 3 as a factor, 4 for 0.25 and so on.</p>