In my game, I have something like this:

The arrow is controlled by the player. The red ball bounces off the edges of the white space, and the goal is to cut away at the white space until a certain percentage is left. You move the arrow to make shapes in the white space to cut out, but I'm not sure how to figure this part out.

Such as in this case. The green is supposed to be cut off, but here's what needs to happen:
1. Determine what constitutes the shape to cut out. Which pixels are in, which are out.
2. Determine which side the ball is on. I can do this if #1 is done.
3. Make the pixels to be cut off transparent. Easy.
However, the difficulty comes from figuring out which pixels to cut out. If I were to somehow cut a square around the ball, I would have to remove all the pixels outside of the square. The fish does not necessarily come back to the point where it started the shape, as in the second diagram.
Coding is not the problem, I am fully capable of coding this if I can just figure out the logic behind this.
