diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 14:39:00 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 14:39:00 +0100 |
| commit | bf5b902180f0e5654f5802cf9ef588ecf57d20c6 (patch) | |
| tree | c6ca474a1c8f044eb7f3ba4199d2455781fafda9 /src/drivers | |
| parent | 49dae86edf4d1deb7f5e39f57f05a6656137ead1 (diff) | |
Rename member Fl_Graphics_Driver::p to xpoint to avoid shadowing.
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | 4 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx | 16 | ||||
| -rw-r--r-- | src/drivers/SVG/Fl_SVG_File_Surface.cxx | 17 |
3 files changed, 18 insertions, 19 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H index fcbbe810b..3062a0217 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H @@ -2,7 +2,7 @@ // Definition of Apple Quartz graphics driver // for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2018 by Bill Spitzak and others. +// Copyright 2010-2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -59,7 +59,7 @@ protected: virtual void cache_size(Fl_Image* img, int &width, int &height); public: Fl_Quartz_Graphics_Driver(); - virtual ~Fl_Quartz_Graphics_Driver() { if (p) free(p); } + virtual ~Fl_Quartz_Graphics_Driver() { if (xpoint) free(xpoint); } virtual int has_feature(driver_feature mask) { return mask & NATIVE; } virtual void gc(void *ctxt) { gc_ = (CGContextRef)ctxt; global_gc(); } virtual void *gc() {return gc_;} diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx index 2e85f3f8d..16c6c6c29 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx @@ -1,7 +1,7 @@ // // Portable drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2018 by Bill Spitzak and others. +// Copyright 1998-2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -29,7 +29,7 @@ void Fl_Quartz_Graphics_Driver::end_points() { for (int i = 0; i < n; i++) { - point(p[i].x, p[i].y); + point(xpoint[i].x, xpoint[i].y); } } @@ -40,9 +40,9 @@ void Fl_Quartz_Graphics_Driver::end_line() { } if (n<=1) return; CGContextSetShouldAntialias(gc_, true); - CGContextMoveToPoint(gc_, p[0].x, p[0].y); + CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - CGContextAddLineToPoint(gc_, p[i].x, p[i].y); + CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y); CGContextStrokePath(gc_); CGContextSetShouldAntialias(gc_, false); } @@ -55,9 +55,9 @@ void Fl_Quartz_Graphics_Driver::end_polygon() { } if (n<=1) return; CGContextSetShouldAntialias(gc_, true); - CGContextMoveToPoint(gc_, p[0].x, p[0].y); + CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - CGContextAddLineToPoint(gc_, p[i].x, p[i].y); + CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y); CGContextClosePath(gc_); CGContextFillPath(gc_); CGContextSetShouldAntialias(gc_, false); @@ -71,9 +71,9 @@ void Fl_Quartz_Graphics_Driver::end_complex_polygon() { } if (n<=1) return; CGContextSetShouldAntialias(gc_, true); - CGContextMoveToPoint(gc_, p[0].x, p[0].y); + CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - CGContextAddLineToPoint(gc_, p[i].x, p[i].y); + CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y); CGContextClosePath(gc_); CGContextFillPath(gc_); CGContextSetShouldAntialias(gc_, false); diff --git a/src/drivers/SVG/Fl_SVG_File_Surface.cxx b/src/drivers/SVG/Fl_SVG_File_Surface.cxx index 701289ac6..73dfd4aa3 100644 --- a/src/drivers/SVG/Fl_SVG_File_Surface.cxx +++ b/src/drivers/SVG/Fl_SVG_File_Surface.cxx @@ -1,7 +1,7 @@ // // Implementation of classes Fl_SVG_Graphics_Driver and Fl_SVG_File_Surface in the Fast Light Tool Kit (FLTK). // -// Copyright 2020 by Bill Spitzak and others. +// Copyright 2020-2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -137,7 +137,6 @@ Fl_SVG_Graphics_Driver::Fl_SVG_Graphics_Driver(FILE *f) { user_dash_array_ = 0; dasharray_ = fl_strdup("none"); p_size = 0; - p = NULL; last_rgb_name_ = NULL; } @@ -856,7 +855,7 @@ void Fl_SVG_Graphics_Driver::loop(int x0, int y0, int x1, int y1, int x2, int y2 void Fl_SVG_Graphics_Driver::end_points() { for (int i=0; i<n; i++) { fprintf(out_, "<path d=\"M %f %f L %f %f\" fill=\"none\" stroke=\"rgb(%u,%u,%u)\" stroke-width=\"%d\" />\n", - p[i].x, p[i].y, p[i].x, p[i].y, red_, green_, blue_, width_); + xpoint[i].x, xpoint[i].y, xpoint[i].x, xpoint[i].y, red_, green_, blue_, width_); } } @@ -866,9 +865,9 @@ void Fl_SVG_Graphics_Driver::end_line() { return; } if (n<=1) return; - fprintf(out_, "<path d=\"M %f %f", p[0].x, p[0].y); + fprintf(out_, "<path d=\"M %f %f", xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - fprintf(out_, " L %f %f", p[i].x, p[i].y); + fprintf(out_, " L %f %f", xpoint[i].x, xpoint[i].y); fprintf(out_, "\" fill=\"none\" stroke=\"rgb(%u,%u,%u)\" stroke-width=\"%d\" stroke-dasharray=\"%s\" stroke-linecap=\"%s\" stroke-linejoin=\"%s\" />\n", red_, green_, blue_, width_, dasharray_, linecap_, linejoin_); } @@ -880,9 +879,9 @@ void Fl_SVG_Graphics_Driver::end_polygon() { return; } if (n<=1) return; - fprintf(out_, "<path d=\"M %f %f", p[0].x, p[0].y); + fprintf(out_, "<path d=\"M %f %f", xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - fprintf(out_, " L %f %f", p[i].x, p[i].y); + fprintf(out_, " L %f %f", xpoint[i].x, xpoint[i].y); fprintf(out_, " z\" fill=\"rgb(%u,%u,%u)\" />\n", red_, green_, blue_); } @@ -910,9 +909,9 @@ void Fl_SVG_Graphics_Driver::end_complex_polygon() { return; } if (n<=1) return; - fprintf(out_, "<path d=\"M %f %f", p[0].x, p[0].y); + fprintf(out_, "<path d=\"M %f %f", xpoint[0].x, xpoint[0].y); for (int i=1; i<n; i++) - fprintf(out_, " L %f %f", p[i].x, p[i].y); + fprintf(out_, " L %f %f", xpoint[i].x, xpoint[i].y); fprintf(out_, " z\" fill=\"rgb(%u,%u,%u)\" />\n", red_, green_, blue_); } |
