Commit e977e790 authored by Volker Krause's avatar Volker Krause
Browse files

Round up when converting vector bounding box to integers

The barcode decoder is very picky in pure mode if element sizes don't
match exactly.
parent 2988fd1c
Pipeline #125733 passed with stage
in 2 minutes and 46 seconds
......@@ -107,8 +107,8 @@ QImage PdfVectorPicture::renderToImage() const
if (d->image.isNull()) {
bool shouldFlip = false;
const double scale = (RenderDPI / 72.0) * scaleFromTransform(d->transform, &shouldFlip); // 1/72 dpi is the unit for the vector coordinates
const int width = boundingRect().width() * scale;
const int height = boundingRect().height() * scale;
const int width = std::ceil(boundingRect().width() * scale);
const int height = std::ceil(boundingRect().height() * scale);
d->image = QImage(width, height, QImage::Format_Grayscale8);
QPainter p(&d->image);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment