summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-09-19 19:03:22 +0000
committerManolo Gouy <Manolo>2011-09-19 19:03:22 +0000
commitbdb000bf2f0ed1800a3072cc072f8e1d7ac4b2b0 (patch)
tree8051bda783eea1d3268a15707288e8914dfcf653 /src
parent1eb3664e7a04208d0579152f58dddd1b7cd0ce6e (diff)
Mac OS: simplified use of CGRectMake() for rectangle drawing and clipping on display and printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm3
-rw-r--r--src/fl_rect.cxx8
2 files changed, 2 insertions, 9 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index d58aae46c..760293a37 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3348,8 +3348,7 @@ WindowRef Fl_X::window_ref()
// so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes
CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
- if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) return CGRectMake(x-0.5, y-0.5, w, h);
- return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0);
+ return CGRectMake(x, y, w-1, h-1);
}
Window fl_xid(const Fl_Window* w)
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index 90e24788e..4a5606357 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -188,13 +188,7 @@ void Fl_Graphics_Driver::rectf(int x, int y, int w, int h) {
rect.right = x + w; rect.bottom = y + h;
FillRect(fl_gc, &rect, fl_brush());
#elif defined(__APPLE_QUARTZ__)
- CGFloat delta_size = 0.9;
- CGFloat delta_ori = 0;
- if (USINGQUARTZPRINTER) {
- delta_size = 0;
- delta_ori = 0.5;
- }
- CGRect rect = CGRectMake(x - delta_ori, y - delta_ori, w - delta_size , h - delta_size);
+ CGRect rect = CGRectMake(x, y, w - 1 , h - 1);
CGContextFillRect(fl_gc, rect);
#else
# error unsupported platform