本文整理汇总了Python中framebuf.FrameBuffer方法的典型用法代码示例。如果您正苦于以下问题:Python framebuf.FrameBuffer方法的具体用法?Python framebuf.FrameBuffer怎么用?Python framebuf.FrameBuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在模块framebuf的用法示例。
在下文中一共展示了framebuf.FrameBuffer方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
点赞 6
# 需要导入模块: import framebuf [as 别名]
# 或者: from framebuf import FrameBuffer [as 别名]
def __init__(self, width, height, external_vcc):
self.width = width
self.height = height
self.external_vcc = external_vcc
self.pages = self.height // 8
self.buffer = bytearray(self.pages * self.width)
fb = framebuf.FrameBuffer(self.buffer, self.width, self.height, framebuf.MONO_VLSB)
self.framebuf = fb
# Provide methods for accessing FrameBuffer graphics primitives. This is a
# workround because inheritance from a native class is currently unsupported.
# http://docs.micropython.org/en/latest/pyboard/library/framebuf.html
self.fill = fb.fill
self.pixel = fb.pixel
self.hline = fb.hline
self.vline = fb.vline
self.line = fb.line
self.rect = fb.rect
self.fill_rect = fb.fill_rect
self.text = fb.text
self.scroll = fb.scroll
self.blit = fb.blit
self.poweron()
self.init_display()
开发者ID:Wei1234c,项目名称:SX127x_driver_for_MicroPython_on_ESP8266,代码行数:25,
示例2: _printchar
点赞 6
# 需要导入模块: import framebuf [as 别名]
# 或者: from framebuf import FrameBuffer [as 别名]
def _printchar(self, char, invert=False):
if char == '\n':