- //respond to event box...
-
-
- //Center the new position at the center of the box
-
- //OH MY GOD HACK - the space is -1* and offset (by the value of the center of the canvas)...
- Point newpos;
- {
- const Point evcenter = (event.p1+event.p2)/2;
- const Point realcenter = (get_work_area()->get_window_tl() + get_work_area()->get_window_br())/2;
- newpos = -(evcenter - realcenter) + get_work_area()->get_focus_point();
- }
-
- //The zoom will be whatever the required factor to convert current box size to desired box size