[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [prison] src/lib: Fix rendering glitches caused by rounding errors in Code 128
From: Volker Krause <null () kde ! org>
Date: 2018-09-16 7:26:32
Message-ID: E1g1RRw-0004ko-Sl () code ! kde ! org
[Download RAW message or body]
Git commit fe7b0ce74704035e4b43ddf7fa45f2bca11e5610 by Volker Krause.
Committed on 16/09/2018 at 07:25.
Pushed by vkrause into branch 'master'.
Fix rendering glitches caused by rounding errors in Code 128
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15526
M +3 -3 src/lib/code128barcode.cpp
https://commits.kde.org/prison/fe7b0ce74704035e4b43ddf7fa45f2bca11e5610
diff --git a/src/lib/code128barcode.cpp b/src/lib/code128barcode.cpp
index a2d73ed..68c19db 100644
--- a/src/lib/code128barcode.cpp
+++ b/src/lib/code128barcode.cpp
@@ -28,11 +28,11 @@
#include "bitvector_p.h"
#include "prison_debug.h"
-using namespace Prison;
-
#include <QImage>
#include <QPainter>
+using namespace Prison;
+
enum {
SymbolSize = 11,
StopPatternSize = 13,
@@ -79,7 +79,7 @@ QImage Code128Barcode::paintImage(const QSizeF& size)
QPainter p(&img);
for (int i = 0; i < bits.size(); ++i) {
if (bits.at(i))
- p.fillRect((QuietZone + i) * moduleSize, 0, moduleSize, img.height(), \
foregroundColor()); + p.fillRect(QRectF((QuietZone + i) * moduleSize, 0, \
moduleSize, img.height()), foregroundColor()); }
return img;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic