diff options
| author | Manolo Gouy <Manolo> | 2015-08-01 18:30:52 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-08-01 18:30:52 +0000 |
| commit | 68f706b7567b07d49be0bad302a466364919876c (patch) | |
| tree | 2a073bd879f5d59efd50d91c6fe193c66a6de821 /src | |
| parent | 4388e5635e365b1d70e3c9a93a4da2354b2acd01 (diff) | |
Bypass Mac OS 10.11 bug in CGContextStrokePath() - continued
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_arci.cxx | 3 | ||||
| -rw-r--r-- | src/fl_vertex.cxx | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/fl_arci.cxx b/src/fl_arci.cxx index 13ce0240d..a4ef738c8 100644 --- a/src/fl_arci.cxx +++ b/src/fl_arci.cxx @@ -66,7 +66,8 @@ void Fl_Graphics_Driver::arc(int x,int y,int w,int h,double a1,double a2) { float r = (w+h)*0.25f-0.5f; CGContextAddArc(fl_gc, cx, cy, r, a1, a2, 1); } - CGContextStrokePath(fl_gc); + extern void CGContextStrokePath_fixed(CGContextRef); + CGContextStrokePath_fixed(fl_gc); CGContextSetShouldAntialias(fl_gc, false); #else # error unsupported platform diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index d665ae4e4..b700c7edd 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -35,6 +35,10 @@ #include <FL/math.h> #include <stdlib.h> +#if defined(__APPLE_QUARTZ__) +extern void CGContextStrokePath_fixed(CGContextRef); +#endif + void Fl_Graphics_Driver::push_matrix() { if (sptr==matrix_stack_size) Fl::error("fl_push_matrix(): matrix stack overflow."); @@ -122,7 +126,7 @@ void Fl_Graphics_Driver::end_points() { for (int i=0; i<n; i++) { CGContextMoveToPoint(fl_gc, p[i].x, p[i].y); CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y); - CGContextStrokePath(fl_gc); + CGContextStrokePath_fixed(fl_gc); } if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false); #else @@ -145,7 +149,7 @@ void Fl_Graphics_Driver::end_line() { CGContextMoveToPoint(fl_gc, p[0].x, p[0].y); for (int i=1; i<n; i++) CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y); - CGContextStrokePath(fl_gc); + CGContextStrokePath_fixed(fl_gc); CGContextSetShouldAntialias(fl_gc, false); #else # error unsupported platform @@ -265,7 +269,7 @@ void Fl_Graphics_Driver::circle(double x, double y,double r) { // Last argument must be 0 (counter-clockwise) or it draws nothing under __LP64__ !!!! CGContextSetShouldAntialias(fl_gc, true); CGContextAddArc(fl_gc, xt, yt, (w+h)*0.25f, 0, 2.0f*M_PI, 0); - (what == POLYGON ? CGContextFillPath : CGContextStrokePath)(fl_gc); + (what == POLYGON ? CGContextFillPath : CGContextStrokePath_fixed)(fl_gc); CGContextSetShouldAntialias(fl_gc, false); #else # error unsupported platform |
