diff options
| author | Manolo Gouy <Manolo> | 2011-04-06 12:33:34 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-04-06 12:33:34 +0000 |
| commit | 80d6099c45e7741df8c77a0668eedfd0133cbffa (patch) | |
| tree | 4812ea748708523c995588c3ce6a888e36323484 | |
| parent | 265f213d23e295007cb33d8e1b94c7598f891e13 (diff) | |
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
| -rw-r--r-- | src/Fl_cocoa.mm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 27b23260c..07ecf5260 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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(); |
