libgui/GuiCanvasWxBackend.py:_drawCharPatch(): fix underscore rendering.

libgui/GuiCanvasWxBackend.py:_get{Brush,Char}PatchColours(): fix {back,fore}ground colour {brush{,es},pen}.
assets/text/TODO: updated.
This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-12 11:26:17 +02:00
parent 58765e187c
commit 3867f34306
2 changed files with 20 additions and 9 deletions

View File

@ -5,12 +5,19 @@
5) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.) 5) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
6) Hotkey & graphical interfaces to {composed,parametrised} tools 6) Hotkey & graphical interfaces to {composed,parametrised} tools
7) Incremental auto{load,save} & {backup,restore} (needs Settings window) 7) Incremental auto{load,save} & {backup,restore} (needs Settings window)
8) GUI: a) switch from wxPython to GTK b) {copy,cut,insert from,paste}, {de,in}crease cell size c) MRU {directories,files} 8) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking}
9) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking} 9) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
10) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...) 10) Composition and parametrisation of tools from higher-order operators (brushes, filters, outlines, patterns & shaders) and unit tools; unit tools:
11) Composition and parametrisation of tools from higher-order operators (brushes, filters, outlines, patterns & shaders) and unit tools; unit tools:
a) geometric primitives (arrow, circle, cloud/speech bubble, curve, heart, hexagon, line, pentagon, polygon, rhombus, triangle, square, star) a) geometric primitives (arrow, circle, cloud/speech bubble, curve, heart, hexagon, line, pentagon, polygon, rhombus, triangle, square, star)
b) regions (crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate) b) regions (crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate)
c) text (edit, Unicode sets) c) text (edit, Unicode sets)
11) GUI:
a) {copy,cut,insert from,paste}, {de,in}crease cell size
b) replace logo w/ canvas panel in About dialogue
c) switch from wxPython to GTK
d) fix underscore rendering
e) MRU {directories,files}
f) ruler
12) fix outstanding {re,un}do bugs
vim:ff=dos tw=0 vim:ff=dos tw=0

View File

@ -44,9 +44,13 @@ class GuiCanvasWxBackend():
fontDc = wx.MemoryDC(); fontDc.SelectObject(fontBitmap); fontDc = wx.MemoryDC(); fontDc.SelectObject(fontBitmap);
fontDc.SetTextForeground(wx.Colour(Colours[patch[0]][:4])) fontDc.SetTextForeground(wx.Colour(Colours[patch[0]][:4]))
fontDc.SetTextBackground(wx.Colour(Colours[patch[1]][:4])) fontDc.SetTextBackground(wx.Colour(Colours[patch[1]][:4]))
fontDc.SetBrush(brushBg); fontDc.SetBackground(brushBg); fontDc.SetPen(pen); fontDc.SetBrush(brushBg); fontDc.SetPen(self._pens[patch[1]]);
fontDc.SetFont(self._font) fontDc.DrawRectangle(0, 0, *self.cellSize)
fontDc.DrawRectangle(0, 0, *self.cellSize); fontDc.DrawText(patch[3], 0, 0); fontDc.SetBackground(brushBg); fontDc.SetPen(pen); fontDc.SetFont(self._font);
if patch[3] == "_":
fontDc.DrawLine(0, self.cellSize[1] - 1, self.cellSize[0], self.cellSize[1] - 1)
else:
fontDc.DrawText(patch[3], 0, 0)
eventDc.Blit(*absPoint, *self.cellSize, fontDc, 0, 0) eventDc.Blit(*absPoint, *self.cellSize, fontDc, 0, 0)
# }}} # }}}
# {{{ _finiBrushesAndPens(self) # {{{ _finiBrushesAndPens(self)
@ -58,7 +62,7 @@ class GuiCanvasWxBackend():
# {{{ _getBrushPatchColours(self, patch) # {{{ _getBrushPatchColours(self, patch)
def _getBrushPatchColours(self, patch): def _getBrushPatchColours(self, patch):
if (patch[0] != -1) and (patch[1] != -1): if (patch[0] != -1) and (patch[1] != -1):
brushBg, brushFg, pen = self._brushes[patch[0]], self._brushes[patch[1]], self._pens[patch[1]] brushBg, brushFg, pen = self._brushes[patch[1]], self._brushes[patch[1]], self._pens[patch[1]]
elif (patch[0] == -1) and (patch[1] == -1): elif (patch[0] == -1) and (patch[1] == -1):
brushBg, brushFg, pen = self._brushes[1], self._brushes[1], self._pens[1] brushBg, brushFg, pen = self._brushes[1], self._brushes[1], self._pens[1]
elif patch[0] == -1: elif patch[0] == -1:
@ -70,7 +74,7 @@ class GuiCanvasWxBackend():
# {{{ _getCharPatchColours(self, patch) # {{{ _getCharPatchColours(self, patch)
def _getCharPatchColours(self, patch): def _getCharPatchColours(self, patch):
if (patch[0] != -1) and (patch[1] != -1): if (patch[0] != -1) and (patch[1] != -1):
brushBg, brushFg, pen = self._brushes[patch[1]], self._brushes[patch[0]], self._pens[patch[1]] brushBg, brushFg, pen = self._brushes[patch[1]], self._brushes[patch[0]], self._pens[patch[0]]
elif (patch[0] == -1) and (patch[1] == -1): elif (patch[0] == -1) and (patch[1] == -1):
brushBg, brushFg, pen = self._brushes[1], self._brushes[1], self._pens[1] brushBg, brushFg, pen = self._brushes[1], self._brushes[1], self._pens[1]
elif patch[0] == -1: elif patch[0] == -1: