summaryrefslogtreecommitdiff
path: root/src/fl_rect.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-04-16 20:19:09 +0000
committerManolo Gouy <Manolo>2010-04-16 20:19:09 +0000
commit913530758af63f00676c6746988aef8b35b02531 (patch)
treed6b59be15047e3c2742158eb5063aca55ea94eba /src/fl_rect.cxx
parent0f180e130639f1017e7ca6b668357304632c1a62 (diff)
Improved the hierarchy of Fl_Device subclasses to allow separation of platform-specific devices.
This introduces multiple inheritance. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_rect.cxx')
-rw-r--r--src/fl_rect.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index df8cbef9a..c9bdf6c47 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -38,12 +38,13 @@
#include <config.h>
#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
+#include <FL/Fl_Printer.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
#ifdef __APPLE_QUARTZ__
extern float fl_quartz_line_width_;
-#define USINGQUARTZPRINTER (Fl_Device::current()->type() == quartz_printer)
+#define USINGQUARTZPRINTER (Fl_Device::current()->type() == Fl_Printer::device_type)
#endif
void Fl_Device::rect(int x, int y, int w, int h) {
@@ -510,7 +511,7 @@ int Fl_Device::not_clipped(int x, int y, int w, int h) {
#elif defined(WIN32)
if (!r) return 1;
RECT rect;
- if (Fl_Device::current()->type() == Fl_Device::gdi_printer) { // in case of print context, convert coords from logical to device
+ if (Fl_Device::current()->type() == Fl_Printer::device_type) { // 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;
@@ -572,7 +573,7 @@ int Fl_Device::clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int&
} else { // partial intersection
RECT rect;
GetRgnBox(temp, &rect);
- if(Fl_Device::current()->type() == Fl_Device::gdi_printer) { // if print context, convert coords from device to logical
+ if(Fl_Device::current()->type() == Fl_Printer::device_type) { // 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;