Add private method _add_padding_into_cols()

This commit is contained in:
belono 2024-05-30 18:05:49 +02:00
parent ecff7ea417
commit c093d5f18a

View File

@ -962,6 +962,17 @@ class Escpos(object, metaclass=ABCMeta):
text_colums.append(row)
return text_colums
def _add_padding_into_cols(
self,
text_list: list[str],
widths: list[int],
align: list[Alignment],
) -> list:
"""Add padding, width and alignment into the items of a list of strings."""
return [
self.padding(text, widths[i], align[i]) for i, text in enumerate(text_list)
]
def set(
self,
align: Optional[str] = None,