With the canvas, draw and fill a rectangle with a rectangular hole in it

25 Views Asked by At

With the HTML5 canvas, I want to draw a rectangle with a rectangular hole in it, and fill not the hole but the other shape. I understand that one way to do it is to draw one rectangle and then stroke it using a large lineWidth, and stroke it with a pattern or whatever. But I want to do it not as a stroke but as a fill.

0

There are 0 best solutions below