Skip to content

Commit

Permalink
Improved the accuracy of clipping when printing on Mac OS.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Apr 13, 2011
1 parent be6df55 commit f7c2061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fl_cocoa.mm
Expand Up @@ -3392,7 +3392,7 @@ static void imgProviderReleaseData (void *info, const void *data, size_t size)

// 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, y, w-1.5 , h-1.5 );
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);
}

Expand Down

0 comments on commit f7c2061

Please sign in to comment.