diff options
| author | Manolo Gouy <Manolo> | 2016-02-18 16:21:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-18 16:21:51 +0000 |
| commit | f33b45f1d30653fb5da4817089e38ff0a2413cfb (patch) | |
| tree | 9edc759690defa581b00b6ada80bb334f4ac5da8 /src/Fl_Paged_Device.cxx | |
| parent | 6ce27012a9412c4964e0ae40c81ea92ff39a61d3 (diff) | |
Remove all uses of the fl_gc global variable. Towards a clean driver model.
fl_gc remains usable by the application as a hook into the system.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Paged_Device.cxx')
| -rw-r--r-- | src/Fl_Paged_Device.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index 76637d787..8fadd7b73 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -64,8 +64,8 @@ void Fl_Paged_Device::print_widget(Fl_Widget* widget, int delta_x, int delta_y) 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 ) { - Fl_X::clip_to_rounded_corners(fl_gc, widget->w(), widget->h()); + if ( fl_mac_os_version >= 100600 && driver()->has_feature(Fl_Graphics_Driver::NATIVE) ) { + Fl_X::clip_to_rounded_corners((CGContextRef)driver()->get_gc(), widget->w(), widget->h()); } #endif } @@ -137,7 +137,6 @@ void Fl_Paged_Device::print_window_part(Fl_Window *win, int x, int y, int w, int Fl_Display_Device::display_device()->set_current(); Fl_Window *save_front = Fl::first_window(); win->show(); - fl_gc = NULL; Fl::check(); win->make_current(); uchar *image_data; @@ -150,8 +149,9 @@ void Fl_Paged_Device::print_window_part(Fl_Window *win, int x, int y, int w, int fl_draw_image(image_data, delta_x, delta_y, w, h, 3); delete[] image_data; #ifdef WIN32 - fl_gc = GetDC(fl_xid(win)); - ReleaseDC(fl_xid(win), fl_gc); + HDC gc = GetDC(fl_xid(win)); + fl_graphics_driver->set_gc(gc); + ReleaseDC(fl_xid(win), gc); #endif } |
