Mercurial > hg > octave-lyh
changeset 13804:4f112bebd474
use correct method to get window position for fltk
* __init_fltk__.cc (figure_manager::do_new_window): Use
figure::properties::get_boundingbox instead of convert_position and
screen_size_pixels.
* grpahics.h.in, graphics.cc (convert_position, screen_size_pixels):
Undo previous change, making these functions static once again.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 03 Nov 2011 11:35:47 -0400 |
parents | a2e158c3451f |
children | b3cdef33ac0e |
files | src/DLD-FUNCTIONS/__init_fltk__.cc src/graphics.cc src/graphics.h.in |
diffstat | 3 files changed, 3 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -1572,11 +1572,7 @@ if (idx >= 0 && windows.find (idx) == windows.end ()) { - Matrix pos = fp.get_position ().matrix_value (); - - Matrix screen_size = screen_size_pixels (); - - pos = convert_position (pos, fp.get_units (), "pixels", screen_size); + Matrix pos = fp.get_boundingbox (true); int x = pos(0); int y = pos(1);
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -411,7 +411,7 @@ return new_font_size; } -Matrix +static Matrix convert_position (const Matrix& pos, const caseless_str& from_units, const caseless_str& to_units, const Matrix& parent_dim) { @@ -635,7 +635,7 @@ } // This function always returns the screensize in pixels -Matrix +static Matrix screen_size_pixels (void) { graphics_object obj = gh_manager::get_object (0);
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -5517,11 +5517,4 @@ // This function is NOT equivalent to the scripting language function gca. OCTINTERP_API graphics_handle gca (void); -extern OCTINTERP_API Matrix -convert_position (const Matrix& pos, const caseless_str& from_units, - const caseless_str& to_units, - const Matrix& parent_dim = Matrix (1, 2, 0.0)); - -extern OCTINTERP_API Matrix screen_size_pixels (void); - #endif