Improves FLTK usage on macintosh computers with retina displays.

The editor demo had grey lines between text lines and its cursor left traces behind
when moved. The scroll demo left some faint lines behind also.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10401 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2014-10-28 13:44:09 +00:00
parent f68d677bde
commit a11d067d68
2 changed files with 2 additions and 2 deletions

View File

@ -3919,7 +3919,7 @@ WindowRef Fl_X::window_ref()
// so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes // 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) { CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0); return CGRectMake(x - 0.5, y - 0.5, w, h);
} }
Window fl_xid(const Fl_Window* w) Window fl_xid(const Fl_Window* w)

View File

@ -188,7 +188,7 @@ void Fl_Graphics_Driver::rectf(int x, int y, int w, int h) {
rect.right = x + w; rect.bottom = y + h; rect.right = x + w; rect.bottom = y + h;
FillRect(fl_gc, &rect, fl_brush()); FillRect(fl_gc, &rect, fl_brush());
#elif defined(__APPLE_QUARTZ__) #elif defined(__APPLE_QUARTZ__)
CGRect rect = CGRectMake(x, y, w - 0.9 , h - 0.9); CGRect rect = CGRectMake(x - 0.5, y - 0.5, w , h);
CGContextFillRect(fl_gc, rect); CGContextFillRect(fl_gc, rect);
#else #else
# error unsupported platform # error unsupported platform