We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f824d00 commit d47dd6aCopy full SHA for d47dd6a
1 file changed
barcode/writer.py
@@ -261,11 +261,7 @@ def render(self, code):
261
if not text["start"]:
262
# If we don't have any start value, print the entire ean
263
ypos += self.text_distance
264
- if self.center_text:
265
- # better center position for text
266
- xpos = bxs + ((bxe - bxs) / 2.0)
267
- else:
268
- xpos = bxs
+ xpos = bxs + (bxe - bxs) / 2.0 if self.center_text else bxs
269
self._callbacks["paint_text"](xpos, ypos)
270
else:
271
# Else, divide the ean into blocks and print each block
0 commit comments