Use a "math" layer where you do all the calculation you need, then have a conversion layer that translates your calculated information into the graphics layer that then renders your results to the screen.
That way all you need to do is flip the Y axis inside the conversion layer.