Why don't you say that your line is a rectangle and simply fill it with your transparent colour ?
[Update]
Quote:
Most lines are DIAGONAL, so cannot be represented by a rectangle. (I didn't bother voting, but if I did, I would also downvote.)
I agree that the answer was short.
But you are making a mistake in your analyze, it looks like you believe that a rectangle is either horizontal or vertical, but you make a mistake.
When you rotate a rectangle, it stay a rectangle, even rotated.
By replacing the line by a rectangle, you make a polygon and the brush tool can be used to fill it.