Once you have your stencil positioned, would it be possible to invert it while it's still positioned in the canvas?

Like imagine defining a keyboard command to quickly flip the positive/negative of the stencil.

I think currently, this would require opening the source PNG in another program and inverting it there, then saving it.
Then adding the new stencil into the canvas and try to position it exactly.