# HG changeset patch # User Ben Abbott # Date 1329080546 18000 # Node ID adb352685deda43b90030f513342fef36db329a7 # Parent e7c74f56cd03e4e92179c442bf0ab6ea8cbb8b45 fltk toolkit: figure position should have its origin at LL not UL. * __init__fltk__.cc: Do not shift the boundingbox origin from LL to UL. diff -r e7c74f56cd03 -r adb352685ded src/DLD-FUNCTIONS/__init_fltk__.cc --- a/src/DLD-FUNCTIONS/__init_fltk__.cc Sat Feb 11 21:09:03 2012 -0500 +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc Sun Feb 12 16:02:26 2012 -0500 @@ -1168,30 +1168,12 @@ pos(2) = ww; pos(3) = hh - status_h - menu_h; - graphics_object obj = gh_manager::get_object (0); - base_properties& rp = obj.get_properties (); - Matrix screen_size = rp.get_boundingbox (true); - pos(0)--; - pos(1)--; - pos(1) = screen_size(3) - pos(1) - pos(3); fp.set_boundingbox (pos, true); } - Matrix get_figure_position (void) - { - graphics_object obj = gh_manager::get_object (0); - base_properties& rp = obj.get_properties (); - Matrix screen_size = rp.get_boundingbox (true); - Matrix pos = fp.get_boundingbox (true); - pos(1) = screen_size(3) - pos(1) - pos(3); - pos(0)++; - pos(1)++; - return pos; - } - void draw (void) { - Matrix pos = get_figure_position (); + Matrix pos = fp.get_boundingbox (true); Fl_Window::resize (pos(0), pos(1), pos(2), pos(3) + status_h + menu_h); return Fl_Window::draw (); @@ -1314,7 +1296,7 @@ dynamic_cast (ax_obj.get_properties ()); double x0, y0, x1, y1; - Matrix pos = get_figure_position (); + Matrix pos = fp.get_boundingbox (true); pixel2pos (ax_obj, pos_x, pos_y, x0, y0); pixel2pos (ax_obj, Fl::event_x (), Fl::event_y (), x1, y1);