How exactly do I get zoom level in GUI?

Ok, let me clarify my goal.

My goal is using preview_crop coordinates in order to get the closest corresponding crop coordinates to another dimension while preserving ratio and relative size.

I think this is what I want and should have clarified from the beginning. But, while simple to state, this seem like a hard problem.


EDIT:

I think I decided to use point GUI element to get around the limitations of this and keep it at 1:1 crop.