From bf5b902180f0e5654f5802cf9ef588ecf57d20c6 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:39:00 +0100 Subject: Rename member Fl_Graphics_Driver::p to xpoint to avoid shadowing. --- src/Fl_Graphics_Driver.cxx | 22 +++++++++++----------- src/Fl_x.cxx | 1 - src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | 4 ++-- .../Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx | 16 ++++++++-------- src/drivers/SVG/Fl_SVG_File_Surface.cxx | 17 ++++++++--------- 5 files changed, 29 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 4601568a3..0ac1a377e 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -1,7 +1,7 @@ // // Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2021 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 @@ -51,7 +51,7 @@ Fl_Graphics_Driver::Fl_Graphics_Driver() font_descriptor_ = NULL; scale_ = 1; p_size = 0; - p = NULL; + xpoint = NULL; }; /** Return the graphics driver used when drawing to the platform's display */ @@ -526,13 +526,13 @@ void Fl_Graphics_Driver::end_points() {} void Fl_Graphics_Driver::end_line() {} void Fl_Graphics_Driver::fixloop() { // remove equal points from closed path - while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--; + while (n>2 && xpoint[n-1].x == xpoint[0].x && xpoint[n-1].y == xpoint[0].y) n--; } /** see fl_end_loop() */ void Fl_Graphics_Driver::end_loop() { fixloop(); - if (n>2) transformed_vertex((float)p[0].x, (float)p[0].y); + if (n>2) transformed_vertex((float)xpoint[0].x, (float)xpoint[0].y); end_line(); } @@ -544,9 +544,9 @@ void Fl_Graphics_Driver::end_complex_polygon() {} /** see fl_gap() */ void Fl_Graphics_Driver::gap() { - while (n>gap_+2 && p[n-1].x == p[gap_].x && p[n-1].y == p[gap_].y) n--; + while (n>gap_+2 && xpoint[n-1].x == xpoint[gap_].x && xpoint[n-1].y == xpoint[gap_].y) n--; if (n > gap_+2) { - transformed_vertex((float)p[gap_].x, (float)p[gap_].y); + transformed_vertex(xpoint[gap_].x, xpoint[gap_].y); gap_ = n; } else { n = gap_; @@ -667,13 +667,13 @@ float Fl_Graphics_Driver::override_scale() { return scale();} void Fl_Graphics_Driver::restore_scale(float) { } void Fl_Graphics_Driver::transformed_vertex0(float x, float y) { - if (!n || x != p[n-1].x || y != p[n-1].y) { + if (!n || x != xpoint[n-1].x || y != xpoint[n-1].y) { if (n >= p_size) { - p_size = p ? 2*p_size : 16; - p = (XPOINT*)realloc((void*)p, p_size*sizeof(*p)); + p_size = xpoint ? 2*p_size : 16; + xpoint = (XPOINT*)realloc((void*)xpoint, p_size*sizeof(*xpoint)); } - p[n].x = x; - p[n].y = y; + xpoint[n].x = x; + xpoint[n].y = y; n++; } } diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 56e316630..b2fd15d27 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -405,7 +405,6 @@ static void fl_new_ic() NULL); } else { fl_is_over_the_spot = 1; - XVaNestedList status_attr = NULL; status_attr = XVaCreateNestedList(0, XNAreaNeeded, &status_area, NULL); XGetICValues(fl_xim_ic, XNStatusAttributes, status_attr, NULL); 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", - 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_, "\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_, "\n", red_, green_, blue_); } @@ -910,9 +909,9 @@ void Fl_SVG_Graphics_Driver::end_complex_polygon() { return; } if (n<=1) return; - fprintf(out_, "\n", red_, green_, blue_); } -- cgit v1.2.3