summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-18 16:21:51 +0000
committerManolo Gouy <Manolo>2016-02-18 16:21:51 +0000
commitf33b45f1d30653fb5da4817089e38ff0a2413cfb (patch)
tree9edc759690defa581b00b6ada80bb334f4ac5da8 /src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
parent6ce27012a9412c4964e0ae40c81ea92ff39a61d3 (diff)
Remove all uses of the fl_gc global variable. Towards a clean driver model.
fl_gc remains usable by the application as a hook into the system. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
index ad6977e12..6400c5056 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
@@ -41,13 +41,13 @@ void Fl_Quartz_Graphics_Driver::vertex(double x,double y) {
}
void Fl_Quartz_Graphics_Driver::end_points() {
- if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+ if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(gc, true);
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);
+ CGContextMoveToPoint(gc, p[i].x, p[i].y);
+ CGContextAddLineToPoint(gc, p[i].x, p[i].y);
+ CGContextStrokePath(gc);
}
- if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+ if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(gc, false);
}
void Fl_Quartz_Graphics_Driver::end_line() {
@@ -56,12 +56,12 @@ void Fl_Quartz_Graphics_Driver::end_line() {
return;
}
if (n<=1) return;
- CGContextSetShouldAntialias(fl_gc, true);
- CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+ CGContextSetShouldAntialias(gc, true);
+ CGContextMoveToPoint(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);
- CGContextSetShouldAntialias(fl_gc, false);
+ CGContextAddLineToPoint(gc, p[i].x, p[i].y);
+ CGContextStrokePath(gc);
+ CGContextSetShouldAntialias(gc, false);
}
void Fl_Quartz_Graphics_Driver::end_loop() {
@@ -77,13 +77,13 @@ void Fl_Quartz_Graphics_Driver::end_polygon() {
return;
}
if (n<=1) return;
- CGContextSetShouldAntialias(fl_gc, true);
- CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+ CGContextSetShouldAntialias(gc, true);
+ CGContextMoveToPoint(gc, p[0].x, p[0].y);
for (int i=1; i<n; i++)
- CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
- CGContextClosePath(fl_gc);
- CGContextFillPath(fl_gc);
- CGContextSetShouldAntialias(fl_gc, false);
+ CGContextAddLineToPoint(gc, p[i].x, p[i].y);
+ CGContextClosePath(gc);
+ CGContextFillPath(gc);
+ CGContextSetShouldAntialias(gc, false);
}
void Fl_Quartz_Graphics_Driver::begin_complex_polygon() {
@@ -108,13 +108,13 @@ void Fl_Quartz_Graphics_Driver::end_complex_polygon() {
return;
}
if (n<=1) return;
- CGContextSetShouldAntialias(fl_gc, true);
- CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+ CGContextSetShouldAntialias(gc, true);
+ CGContextMoveToPoint(gc, p[0].x, p[0].y);
for (int i=1; i<n; i++)
- CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
- CGContextClosePath(fl_gc);
- CGContextFillPath(fl_gc);
- CGContextSetShouldAntialias(fl_gc, false);
+ CGContextAddLineToPoint(gc, p[i].x, p[i].y);
+ CGContextClosePath(gc);
+ CGContextFillPath(gc);
+ CGContextSetShouldAntialias(gc, false);
}
void Fl_Quartz_Graphics_Driver::circle(double x, double y,double r) {
@@ -129,10 +129,10 @@ void Fl_Quartz_Graphics_Driver::circle(double x, double y,double r) {
// Quartz warning: circle won't scale to current matrix!
// 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);
- CGContextSetShouldAntialias(fl_gc, false);
+ CGContextSetShouldAntialias(gc, true);
+ CGContextAddArc(gc, xt, yt, (w+h)*0.25f, 0, 2.0f*M_PI, 0);
+ (what == POLYGON ? CGContextFillPath : CGContextStrokePath)(gc);
+ CGContextSetShouldAntialias(gc, false);
}
#endif // FL_CFG_GFX_QUARTZ