Mercurial > hg > octave-nkf
diff src/DLD-FUNCTIONS/__init_fltk__.cc @ 13799:760e4e88dba3
convert units for figure positions
* graphics.h.in, graphics.cc (convert_position, screen_size_pixels):
Now extern.
* __init_fltk__.cc (figure_manager::do_new_window): Convert specified
position to pixels.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 03 Nov 2011 04:33:25 -0400 |
parents | 718f78b01de1 |
children | 4f112bebd474 |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -1574,6 +1574,10 @@ { Matrix pos = fp.get_position ().matrix_value (); + Matrix screen_size = screen_size_pixels (); + + pos = convert_position (pos, fp.get_units (), "pixels", screen_size); + int x = pos(0); int y = pos(1); int w = pos(2);