Commit 3458e47
authored
Bugfix: support decimal magnification values by rounding up (#111)
* When we tried to magnify using decimal value such as 1.2 the barcode image is 'cut' due to width being truncated a bit.
This is fixed by converting width to near integer value using Math.ceil.
Also, add test case to verify the same svg
* To round off height in case of decimal values being used to magnify using Math.ceil1 parent 2c35df3 commit 3458e47
File tree
4 files changed
+11
-2
lines changed- src
- main/java/uk/org/okapibarcode/output
- test
- java/uk/org/okapibarcode/output
- resources/uk/org/okapibarcode/output
4 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
217 | 225 | | |
218 | 226 | | |
219 | 227 | | |
| |||
Lines changed: 1 addition & 0 deletions
Loading
0 commit comments