diff options
| author | Manolo Gouy <Manolo> | 2015-11-19 16:33:44 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-11-19 16:33:44 +0000 |
| commit | 511ec0bb3dcddcb013873fa69d51d2059aed9b0c (patch) | |
| tree | 5b06134a3d758c26df1245c5685673f16222c398 /src/Fl_Paged_Device.cxx | |
| parent | 0d2517331c85fd45bcd4ef6fd009cde7777436ee (diff) | |
Mac OS: have Fl_Paged_Device::print_widget() print top-level windows with
rounded bottom corners as they appear on screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Paged_Device.cxx')
| -rw-r--r-- | src/Fl_Paged_Device.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index 060837c24..f3b5f21fe 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -56,7 +56,16 @@ void Fl_Paged_Device::print_widget(Fl_Widget* widget, int delta_x, int delta_y) translate(new_x - old_x, new_y - old_y ); } // if widget is a main window, clip all drawings to the window area - if (is_window && !widget->window()) fl_push_clip(0, 0, widget->w(), widget->h() ); + if (is_window && !widget->window()) { + fl_push_clip(0, 0, widget->w(), widget->h() ); +#ifdef __APPLE__ // for Mac OS X 10.6 and above, make window with rounded bottom corners + if ( fl_mac_os_version >= 100600 && driver()->class_name() == Fl_Quartz_Graphics_Driver::class_id ) { + CGContextRestoreGState(fl_gc); + Fl_X::clip_to_rounded_corners(fl_gc, widget->w(), widget->h()); + CGContextSaveGState(fl_gc); + } +#endif + } // we do some trickery to recognize OpenGL windows and draw them via a plugin int drawn_by_plugin = 0; if (widget->as_gl_window()) { |
