There is a family of "mapTo" and "mapFrom" methods in various classes. The painter always operates on "logic" coordinates. The widget should operate on "physical" ones.