Move 0.5 up/down rounding into rounding expression (via @lightmare 7f54e94748 (r369294323)) (ref #4116)

This commit is contained in:
Artem Pavlenko 2020-01-22 10:45:15 +00:00
parent cab05f1f2c
commit 97e33ec8ca

View file

@ -75,11 +75,11 @@ struct main_marker_visitor
std::tie(w, h) = marker.dimensions(); std::tie(w, h) = marker.dimensions();
double svg_width = w * scale_factor_ + 0.5; double svg_width = w * scale_factor_;
double svg_height = h * scale_factor_ + 0.5; double svg_height = h * scale_factor_;
int output_width = static_cast<int>(svg_width); int output_width = static_cast<int>(svg_width + 0.5);
int output_height = static_cast<int>(svg_height); int output_height = static_cast<int>(svg_height + 0.5);
if (verbose_) if (verbose_)
{ {
std::clog << "Found width of '" << w << "' and height of '" << h << "'\n"; std::clog << "Found width of '" << w << "' and height of '" << h << "'\n";