Author: manolo
Date: 2011-04-06 05:33:34 -0700 (Wed, 06 Apr 2011)
New Revision: 8564
Log:
Window title bars are now printed with their rounded angles.
Modified:
branches/branch-1.3/src/Fl_cocoa.mm
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-04-06 12:11:26 UTC (rev 8563)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-04-06 12:33:34 UTC (rev 8564)
@@ -2842,7 +2842,21 @@
printer.rotate(20.);
printer.print_widget( win, - win->w()/2, - win->h()/2 );
#else
- if (bt) printer.print_window_part(win, 0, -bt, win->w(), bt, 0, 1);
+ if (bt) { // print the window title bar
+ //printer.print_window_part(win, 0, -bt, win->w(), bt, 0, 1);
+ Fl_Display_Device::display_device()->set_current();
+ win->show();
+ fl_gc = NULL;
+ Fl::check();
+ win->make_current();
+ CGImageRef img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
+ printer.set_current();
+ CGRect rect = { { 0, 1 }, { win->w(), bt } };
+ Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
+ CGContextDrawImage(fl_gc, rect, img);
+ Fl_X::q_end_image();
+ CGImageRelease(img);
+ }
printer.print_widget(win, 0, bt);
#endif
printer.end_page();
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit