Mercurial > hg > octave-max
comparison 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 |
comparison
equal
deleted
inserted
replaced
14356:c097c22e9294 | 14357:e7c74f56cd03 |
---|---|
3039 ss(2) *= 72 / dpi; | 3039 ss(2) *= 72 / dpi; |
3040 ss(3) *= 72 / dpi; | 3040 ss(3) *= 72 / dpi; |
3041 } | 3041 } |
3042 | 3042 |
3043 set_screensize (ss); | 3043 set_screensize (ss); |
3044 } | |
3045 | |
3046 Matrix | |
3047 root_figure::properties::get_boundingbox (bool internal, const Matrix&) const | |
3048 { | |
3049 Matrix screen_size = screen_size_pixels (); | |
3050 Matrix pos = Matrix (1, 4, 0); | |
3051 pos(2) = screen_size(0); | |
3052 pos(3) = screen_size(1); | |
3053 return pos; | |
3044 } | 3054 } |
3045 | 3055 |
3046 /* | 3056 /* |
3047 %!test | 3057 %!test |
3048 %! set (0, "units", "pixels") | 3058 %! set (0, "units", "pixels") |