Window title bars are now printed with their rounded angles.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8564 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2011-04-06 12:33:34 +00:00
parent 265f213d23
commit 80d6099c45
+15 -1
View File
@@ -2842,7 +2842,21 @@ int Fl_X::screen_init(XRectangle screens[], float dpi[])
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();