Fix width calculation
This commit is contained in:
parent
565e0821d9
commit
351ba0a77a
1 changed files with 1 additions and 2 deletions
|
|
@ -91,8 +91,7 @@ def cli(data, outfile, height, text, font, font_size, bar_width, margin, color,
|
|||
])
|
||||
data_encoded = [True, False, True, False, *data_encoded, False, True, True, False, True]
|
||||
|
||||
bars = 32/2*3 + 2
|
||||
width = bars * bar_width
|
||||
width = len(data_encoded) * bar_width
|
||||
# 1 px = 0.75 pt
|
||||
pt_to_mm = lambda pt: pt / 0.75 /dpi * 25.4
|
||||
font_size = pt_to_mm(font_size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue