Legacy GM Draw a portion of a sprite

Hey everyone, I'm trying to find the best way to do flooring/terrain in my game but I can't find out how to do it the way I want. I want it to look like this:

basically I draw a tiled background on the whole room and remove the portion that isn't touching the object. I think it could be done using surfaces, but I'm not sure... PS. the white portion shown on the photo wouldn't be white in the game, so I couldn't just draw a white rectangle above the background and remove some of the rectangle. I just wanted to point that out ;)
I don't know how else to explain it so if you need more info just say so and I'll try to explain it better.
 
Top