GfXShading: Prepend some variables with bbox_
Makes it clear those variables are only about the bbox, also fixes shadow warnings
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index dc7939b..a562a6c 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -3516,10 +3516,10 @@
background.c[i] = shading->background.c[i];
}
hasBackground = shading->hasBackground;
- xMin = shading->xMin;
- yMin = shading->yMin;
- xMax = shading->xMax;
- yMax = shading->yMax;
+ bbox_xMin = shading->bbox_xMin;
+ bbox_yMin = shading->bbox_yMin;
+ bbox_xMax = shading->bbox_xMax;
+ bbox_yMax = shading->bbox_yMax;
hasBBox = shading->hasBBox;
}
@@ -3630,7 +3630,7 @@
}
}
- xMin = yMin = xMax = yMax = 0;
+ bbox_xMin = bbox_yMin = bbox_xMax = bbox_yMax = 0;
hasBBox = false;
obj1 = dict->lookup("BBox");
if (obj1.isArray()) {
@@ -3642,10 +3642,10 @@
if (obj2.isNum() && obj3.isNum() && obj4.isNum() && obj5.isNum())
{
hasBBox = true;
- xMin = obj2.getNum();
- yMin = obj3.getNum();
- xMax = obj4.getNum();
- yMax = obj5.getNum();
+ bbox_xMin = obj2.getNum();
+ bbox_yMin = obj3.getNum();
+ bbox_xMax = obj4.getNum();
+ bbox_yMax = obj5.getNum();
} else {
error(errSyntaxWarning, -1, "Bad BBox in shading dictionary (Values not numbers)");
}
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index 57bb26f..88463d1 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -866,7 +866,7 @@
const GfxColor *getBackground() const { return &background; }
bool getHasBackground() const { return hasBackground; }
void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) const
- { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+ { *xMinA = bbox_xMin; *yMinA = bbox_yMin; *xMaxA = bbox_xMax; *yMaxA = bbox_yMax; }
bool getHasBBox() const { return hasBBox; }
protected:
@@ -885,7 +885,7 @@
bool hasBBox;
GfxColorSpace *colorSpace;
GfxColor background;
- double xMin, yMin, xMax, yMax;
+ double bbox_xMin, bbox_yMin, bbox_xMax, bbox_yMax;
};
//------------------------------------------------------------------------