aboutsummaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-26 16:46:54 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-26 16:46:54 +0100
commitd67ce07ca29cc864c59faa8eed6dfca7773d3291 (patch)
tree57bc162773d0222bdf82491bbc21a2c1aea94863 /src/__main__.py
parentusing colours (diff)
downloadxpybar-d67ce07ca29cc864c59faa8eed6dfca7773d3291.tar.gz
xpybar-d67ce07ca29cc864c59faa8eed6dfca7773d3291.tar.bz2
xpybar-d67ce07ca29cc864c59faa8eed6dfca7773d3291.tar.xz
plane 0 text drawing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-xsrc/__main__.py13
1 files 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()