So determine where the start and endpoints are, then do a check if the "big bad" (via a point-in-polygon check) is inside the closed off area, then do a left or rightsided add of the line and the polygon has become bigger.
![gals panic series gals panic series](https://cdn.cloudflare.steamstatic.com/steam/apps/1154720/ss_188e3785b757005f612460ce6bbe9a6716ff9cd1.1920x1080.jpg)
When the line drawn ends intersects the start polygon, the polygon is expanded. Basically the line starts on a edge on the source polygon. This method is based on adding polygons to the existing start polygon. need a pixel collision type to move around etc. You can do speedbonusses, but those are a bit tougher to construct.
![gals panic series gals panic series](https://www.mobygames.com/images/shots/s/713241-gals-panic-arcade-screenshot-title-screen.jpg)
The first one, is the way Gals Panic actually works: checking against pixels. There are two ways of realizing the gameplay field. So suppose the filled game area is white and the backdrop is black, a simple multiplication can make those white areas show the revealed picture. These two are combined to produce the end result.
![gals panic series gals panic series](https://i.ytimg.com/vi/3IN2QkQy2W4/hqdefault.jpg)
The 2nd one is the actual gamefield where the game is checked against. One is the picture that you want to be revealed. The general concept here is, having two images. You may search for Qix to get more information on how things work.