So far Untested but ...
you could try(experiment!) using the invert function and play with that...So like a combination of both overlap and inverted overlap
so something like...
is red cube x,y, = black cube x,y ->
is red cube overlapping ->
is red cube width,height <= to Black Cube width,height ->
as a pre check set of conditions
and then compare it to the next statement
is red cube x,y, = black cube x,y ->
is red cube NOT overlapping -> (use the invert function)
of course this doesnt take into consideration any Alpha transparencies areas that the object may have..
That I know of
Its always worth experimenting...You may find out something new and undocumented.....!!! bonus points if you share!!!