diff --git a/src/agg/process_raster_symbolizer.cpp b/src/agg/process_raster_symbolizer.cpp index cdc85c833..e27e47c00 100644 --- a/src/agg/process_raster_symbolizer.cpp +++ b/src/agg/process_raster_symbolizer.cpp @@ -108,10 +108,10 @@ void agg_renderer::process(raster_symbolizer const& sym, double image_ratio_x = ext.width() / source->data_.width(); double image_ratio_y = ext.height() / source->data_.height(); double eps = 1e-5; - if ( (std::fabs(image_ratio_x - 1) <= eps) && - (std::fabs(image_ratio_y - 1) <= eps) && - (std::fabs(start_x) <= eps) && - (std::fabs(start_y) <= eps) ) + if ( (std::fabs(image_ratio_x - 1.0) <= eps) && + (std::fabs(image_ratio_y - 1.0) <= eps) && + (std::abs(start_x) <= eps) && + (std::abs(start_y) <= eps) ) { composite(current_buffer_->data(), source->data_, sym.comp_op(), sym.get_opacity(), diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index 0ae0c95c6..8ccd4ad41 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -939,10 +939,10 @@ void cairo_renderer_base::process(raster_symbolizer const& sym, double image_ratio_x = ext.width() / source->data_.width(); double image_ratio_y = ext.height() / source->data_.height(); double eps = 1e-5; - if ( (std::fabs(image_ratio_x - 1) <= eps) && - (std::fabs(image_ratio_y - 1) <= eps) && - (std::fabs(start_x) <= eps) && - (std::fabs(start_y) <= eps) ) + if ( (std::fabs(image_ratio_x - 1.0) <= eps) && + (std::fabs(image_ratio_y - 1.0) <= eps) && + (std::abs(start_x) <= eps) && + (std::abs(start_y) <= eps) ) { cairo_save_restore guard(context_); context_.set_operator(sym.comp_op());