It can be complicated or very simple.
The hard way:
Create a path exactly like your polygon, except that do not close it. Continue on to the nearest wall. Draw around the walls. Close and fill. In code, this is not too much fun.
A simple way:
The color of the canvas. Draw a polygon.
Good luck.
source share