Mercurial > hg > octave-nkf
diff src/graphics.cc @ 14357:e7c74f56cd03
fltk toolkit requires figure units to be "pixels". Bug # 35430.
* graphics.cc (root_figure::properties::get_boundingbox): New function.
* graphics.h.in (root_figure::properties::get_boundingbox): New function.
* __init__fltk__.cc (class plot_window::draw,redraw,handle): Use get/set
boundingbox (units are fixed to pixels) rather than get/set position.
Add plot_window::get_figure_postion, which returns figure position in pixels.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 11 Feb 2012 21:09:03 -0500 |
parents | 63f1bdf08339 |
children | ba01a38bc5c1 |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -3043,6 +3043,16 @@ set_screensize (ss); } +Matrix +root_figure::properties::get_boundingbox (bool internal, const Matrix&) const +{ + Matrix screen_size = screen_size_pixels (); + Matrix pos = Matrix (1, 4, 0); + pos(2) = screen_size(0); + pos(3) = screen_size(1); + return pos; +} + /* %!test %! set (0, "units", "pixels")