changeset 14358:adb352685ded

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.
author Ben Abbott <bpabbott@mac.com>
date Sun, 12 Feb 2012 16:02:26 -0500
parents e7c74f56cd03
children 7277fe922e99
files src/DLD-FUNCTIONS/__init_fltk__.cc
diffstat 1 files changed, 2 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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<axes::properties&> (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);