Initialization for values, inside shape's bounds functions

This commit is contained in:
Serhii Rieznik 2019-12-10 22:38:28 +01:00
parent b1c9f2825d
commit 0531e360b2
1 changed files with 8 additions and 0 deletions

View File

@ -49,11 +49,19 @@ void Shape::normalize() {
}
void Shape::bounds(double &l, double &b, double &r, double &t) const {
l = DBL_MAX;
b = DBL_MAX;
r = -DBL_MAX;
t = -DBL_MAX;
for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour)
contour->bounds(l, b, r, t);
}
void Shape::miterBounds(double &l, double &b, double &r, double &t, double border, double miterLimit) const {
l = DBL_MAX;
b = DBL_MAX;
r = -DBL_MAX;
t = -DBL_MAX;
for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour)
contour->miterBounds(l, b, r, t, border, miterLimit);
}