summaryrefslogtreecommitdiff
path: root/src/fl_rect.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2012-03-18 18:48:29 +0000
committerManolo Gouy <Manolo>2012-03-18 18:48:29 +0000
commit32d4bc4099ac62a32166c9d39ddd47d6a193be2a (patch)
treed01eab46321ea19780aa7ca0614cdd258885e368 /src/fl_rect.cxx
parent53ccc787591de6b4aea756f45c8d3cdd6611b818 (diff)
Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_rect.cxx')
-rw-r--r--src/fl_rect.cxx8
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;