From d67ce07ca29cc864c59faa8eed6dfca7773d3291 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Feb 2014 16:46:54 +0100 Subject: plane 0 text drawing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/__main__.py b/src/__main__.py index e04c044..08c0f94 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -41,9 +41,18 @@ while True: except KeyboardInterrupt: break cmap = window.get_attributes().colormap - print(cmap) - gc.change(foreground = cmap.alloc_color(0xFFFF, 0x0000, 0x4000).pixel) + gc.change(foreground = cmap.alloc_color(0x0000, 0x0000, 0x0000).pixel) window.fill_rectangle(gc, 0, 0, width, panel_height) + gc.change(foreground = cmap.alloc_color(0xC0C0, 0xC0C0, 0xC0C0).pixel) + gc.change(font = display.open_font('-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*')) + text_ = '°°° TEST °°° ꚺ░∈𝕐 '.encode('utf-16')[2:] + text = [] + for i in range(len(text_)): + if (i & 1) == 0: + text.append(text_[i]) + else: + text[-1] |= text_[i] << 8 + window.image_text_16(gc, 0, 10, text) display.flush() window.unmap() -- cgit v1.2.3-70-g09d2