Skip to content

Commit

Permalink
Fix the bug that global default parameters cannot be inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
funnygeeker committed Apr 27, 2024
1 parent 210fa72 commit 7c0186b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified lib/easydisplay.mpy
Binary file not shown.
8 changes: 4 additions & 4 deletions lib/easydisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def load_font(self, file: str):
self.font_bitmap_size = self.font_bmf_info[8]

def text(self, s: str, x: int, y: int,
color: int = 0xFFFF, bg_color: int = 0, size: int = None,
color: int = None, bg_color: int = None, size: int = None,
half_char: bool = None, auto_wrap: bool = None, show: bool = None, clear: bool = None,
key: bool = None, invert: bool = None, line_spacing: int = None, *args, **kwargs):
"""
Expand Down Expand Up @@ -401,7 +401,7 @@ def text(self, s: str, x: int, y: int,
def ppm(self, *args, **kwargs):
self.pbm(*args, **kwargs)

def pbm(self, file, x, y, key: int = -1, show: bool = None, clear: bool = None, invert: bool = False,
def pbm(self, file, x, y, key: int = None, show: bool = None, clear: bool = None, invert: bool = False,
color: int = None, bg_color: int = None):
"""
Display PBM / PPM Image
Expand Down Expand Up @@ -578,7 +578,7 @@ def pbm(self, file, x, y, key: int = -1, show: bool = None, clear: bool = None,

self.show() if show else 0 # 立即显示

def bmp(self, file, x, y, key: int = -1, show: bool = None, clear: bool = None, invert: bool = False,
def bmp(self, file, x, y, key: int = None, show: bool = None, clear: bool = None, invert: bool = False,
color: int = None, bg_color: int = None):
"""
Display BMP Image 显示 bmp 图片
Expand Down Expand Up @@ -722,7 +722,7 @@ def bmp(self, file, x, y, key: int = -1, show: bool = None, clear: bool = None,
else:
raise TypeError("Unsupported file type: only BMP images are supported.")

def dat(self, file, x, y, key=-1):
def dat(self, file, x, y, key=None):
"""
Display screen raw data file, with extremely high efficiency, only supports RGB565 format.
显示表示屏幕原始数据的文件,拥有极高的效率,仅支持 RGB565 格式
Expand Down

0 comments on commit 7c0186b

Please sign in to comment.