REFACTOR variables to be lower case
This commit is contained in:
parent
bf3012b882
commit
f6e0edc7c7
|
@ -238,12 +238,12 @@ class Escpos(object):
|
||||||
|
|
||||||
(width, height) = image.size
|
(width, height) = image.size
|
||||||
self._raw(S_RASTER_N)
|
self._raw(S_RASTER_N)
|
||||||
headerX = int(width / 8)
|
header_x = int(width / 8)
|
||||||
headerY = height
|
header_y = height
|
||||||
buf = "{0:02X}".format((headerX & 0xff))
|
buf = "{0:02X}".format((header_x & 0xff))
|
||||||
buf += "{0:02X}".format(((headerX >> 8) & 0xff))
|
buf += "{0:02X}".format(((header_x >> 8) & 0xff))
|
||||||
buf += "{0:02X}".format((headerY & 0xff))
|
buf += "{0:02X}".format((header_y & 0xff))
|
||||||
buf += "{0:02X}".format(((headerY >> 8) & 0xff))
|
buf += "{0:02X}".format(((header_y >> 8) & 0xff))
|
||||||
#self._raw(binascii.unhexlify(buf))
|
#self._raw(binascii.unhexlify(buf))
|
||||||
for y in range(height):
|
for y in range(height):
|
||||||
for x in range(width):
|
for x in range(width):
|
||||||
|
@ -486,8 +486,8 @@ class Escpos(object):
|
||||||
:param columns: amount of columns
|
:param columns: amount of columns
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
colCount = self.columns if columns is None else columns
|
col_count = self.columns if columns is None else columns
|
||||||
self.text(textwrap.fill(txt, colCount))
|
self.text(textwrap.fill(txt, col_count))
|
||||||
|
|
||||||
def set(self, align='left', font='a', text_type='normal', width=1, height=1, density=9, invert=False, smooth=False, flip=False):
|
def set(self, align='left', font='a', text_type='normal', width=1, height=1, density=9, invert=False, smooth=False, flip=False):
|
||||||
""" Set text properties by sending them to the printer
|
""" Set text properties by sending them to the printer
|
||||||
|
|
Loading…
Reference in New Issue