Automatically shape filling material

Hi folks,

is there any way to fill in the hatched areas as shown in the image, for example in the material you are painting on with a render target once a shape is closed (Like A Circle)? I need it to recreate an amzaing project from past. The player currently can draw with a render target but I need the inner side of his shape to be filled out.