asciimoo / drawille

Pixel graphics in terminal with unicode braille characters
GNU Affero General Public License v3.0
3.13k stars 129 forks source link

Why does drawille does not draw in full terminal ? #33

Closed darxtrix closed 7 years ago

darxtrix commented 7 years ago

My terminal size is 202*62 but drawille is drawing a line in half of the terminal, why so ?

>>> import drawille
>>> drawille.getTerminalSize()
(202, 62)
>>> c = drawille.Canvas()
>>> for i in range(0,202):
...     c.set(i,0)
... 
>>> print c.frame(0,0,202,62)
screen shot 2017-07-16 at 3 19 19 pm
asciimoo commented 7 years ago

@darxtrix getTerminalSize() measures the terminal size in characters, but drawille has 4x2 pixel for each character. That's why the line's width in the screenshot is exactly the half of your terminal's width. Multiply the width by 2 and the height by 4 and it will produce the desired output.

darxtrix commented 7 years ago

Thanks a ton, I did a bit digging into code and find the same workaround.