diff options
Diffstat (limited to 'src/fl_rect.cxx')
| -rw-r--r-- | src/fl_rect.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 33a874856..ee4430497 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -3,7 +3,7 @@ // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2012 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -40,7 +40,7 @@ extern int fl_line_width_; #ifdef __APPLE_QUARTZ__ extern float fl_quartz_line_width_; -#define USINGQUARTZPRINTER (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) +#define USINGQUARTZPRINTER (Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) #endif #ifdef USE_X11 @@ -612,7 +612,7 @@ int Fl_Graphics_Driver::not_clipped(int x, int y, int w, int h) { return XRectInRegion(r, x, y, w, h); #elif defined(WIN32) RECT rect; - if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { // in case of print context, convert coords from logical to device + if (Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) { // in case of print context, convert coords from logical to device POINT pt[2] = { {x, y}, {x + w, y + h} }; LPtoDP(fl_gc, pt, 2); rect.left = pt[0].x; rect.top = pt[0].y; rect.right = pt[1].x; rect.bottom = pt[1].y; @@ -672,7 +672,7 @@ int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y, int } else { // partial intersection RECT rect; GetRgnBox(temp, &rect); - if(Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { // if print context, convert coords from device to logical + if (Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) { // if print context, convert coords from device to logical POINT pt[2] = { {rect.left, rect.top}, {rect.right, rect.bottom} }; DPtoLP(fl_gc, pt, 2); X = pt[0].x; Y = pt[0].y; W = pt[1].x - X; H = pt[1].y - Y; |
