diff options
| author | Manolo Gouy <Manolo> | 2010-01-29 21:16:20 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-01-29 21:16:20 +0000 |
| commit | 4645ed97031bb2ce1122ec890a6c6ac55590c94a (patch) | |
| tree | dac195e42bb3183ae1626f8c00f3af0a9515480d /src/Fl_cocoa.mm | |
| parent | 7f518b9287269190f63d4bb3d6933624308ffecd (diff) | |
defined macro FL_CGRECTMAKE_COCOA that
contains the correct way to transform x,y,w,h into
a CGRect adequate for clipping
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index ce4cacd1d..bd950ebef 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -99,7 +99,7 @@ extern CGContextRef CreateNoneImage(void); // converting cr lf converter function static void convert_crlf(char * string, size_t len); static void createAppleMenu(void); -Fl_Region MacRegionMinusRect(Fl_Region r, int x,int y,int w,int h); +static Fl_Region MacRegionMinusRect(Fl_Region r, int x,int y,int w,int h); static void cocoaMouseHandler(NSEvent *theEvent); // public variables @@ -2620,14 +2620,14 @@ void MacUnmapWindow(Fl_Window *w, void *p) { MacUnlinkWindow(Fl_X::i(w)); } -Fl_Region MacRegionMinusRect(Fl_Region r, int x,int y,int w,int h) +static Fl_Region MacRegionMinusRect(Fl_Region r, int x,int y,int w,int h) /* removes x,y,w,h rectangle from region r and returns result as a new Fl_Region */ { Fl_Region outr = (Fl_Region)malloc(sizeof(*outr)); outr->rects = (CGRect*)malloc(4 * r->count * sizeof(CGRect)); outr->count = 0; - CGRect rect = CGRectMake(x,y,w - 0.9,h - 0.9); + CGRect rect = FL_CGRECTMAKE_COCOA(x, y, w, h); for( int i = 0; i < r->count; i++) { CGRect A = r->rects[i]; CGRect test = CGRectIntersection(A, rect); @@ -2672,7 +2672,7 @@ Fl_Region MacRectRegionIntersect(Fl_Region current, int x,int y,int w, int h) */ { if (current == NULL) return XRectangleRegion(x,y,w,h); - CGRect r = CGRectMake(x, y, w - 0.9, h - 0.9); + CGRect r = FL_CGRECTMAKE_COCOA(x, y, w, h); Fl_Region outr = (Fl_Region)malloc(sizeof(*outr)); outr->count = current->count; outr->rects =(CGRect*)malloc(outr->count * sizeof(CGRect)); |
