Author: manolo
Date: 2011-08-09 08:52:02 -0700 (Tue, 09 Aug 2011)
New Revision: 8937
Log:
Print with print_window() to get also the window border.
Modified:
branches/branch-3.0/fluid/fluid.cxx
Modified: branches/branch-3.0/fluid/fluid.cxx
===================================================================
--- branches/branch-3.0/fluid/fluid.cxx 2011-08-09 11:01:44 UTC (rev 8936)
+++ branches/branch-3.0/fluid/fluid.cxx 2011-08-09 15:52:02 UTC (rev 8937)
@@ -1025,8 +1025,8 @@
fltk3::draw(buffer, width - (int)fltk3::width(buffer), fontsize);
// find a good size for printing
- fltk3::Widget *w = windows[winpage]->o;
- int ww = w->w(), hh = w->h();
+ fltk3::Window *w = (fltk3::Window*)windows[winpage]->o;
+ int ww = w->decorated_w(), hh = w->decorated_h();
double sx = (0.95*width)/ww;
double sy = (0.95*(height-30))/hh;
double scale = (sx<sy)?sx:sy;
@@ -1038,12 +1038,8 @@
p->origin(0.5*(width-ww), 30/scale);
// draw the widget
- p->print_widget(w);
+ p->print_window(w);
- // reset stuff (probably not needed)
- p->scale(1.0, 1.0);
- p->origin(0.0, 0.0);
-
// flush the page out
p->end_page();
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit