Mercurial > hg > octave-lyh
diff src/graphics.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 | 1e81e2e30af3 |
children | 195ff3561152 |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -411,10 +411,9 @@ return new_font_size; } -static Matrix +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)) + const caseless_str& to_units, const Matrix& parent_dim) { Matrix retval (1, pos.numel ()); double res = 0; @@ -636,7 +635,7 @@ } // This function always returns the screensize in pixels -static Matrix +Matrix screen_size_pixels (void) { graphics_object obj = gh_manager::get_object (0);