Erase back- w/ foreground colour on <RMB>.

assets/text/hotkeys.txt: updated.
assets/text/TODO: updated.
This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-24 15:44:54 +02:00
parent c083800b3b
commit 6ab7c443eb
3 changed files with 31 additions and 26 deletions

View File

@ -1,28 +1,28 @@
1) ANSI CSI CU[BDPU] sequences & italic 1) ANSI CSI CU[BDPU] sequences & italic
2) Documentation, instrumentation & unit tests 2) Fix & finish Arabic/RTL text tool support
3) Layers & layout (e.g. for comics, zines, etc.) 3) Documentation, instrumentation & unit tests
4) Open and toggle a reference image in the background 4) Layers & layout (e.g. for comics, zines, etc.)
5) Client-Server or Peer-to-Peer realtime collaboration 5) Open and toggle a reference image in the background
6) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.) 6) Client-Server or Peer-to-Peer realtime collaboration
7) {record,replay} {keyboard,mouse,...} events in debugging builds 7) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
8) Unit tools: arrow, {cloud,speech bubble}, curve, measure, polygon, triangle 8) {record,replay} {keyboard,mouse,...} events in debugging builds
9) Integrate ENNTool code in the form of OpenGL-based animation window (see 13) and 14)) 9) Unit tools: arrow, {cloud,speech bubble}, curve, measure, polygon, triangle
10) Composition, parametrisation & keying of tools from higher-order operators (brushes, functions, filters, outlines, patterns & shaders) and unit tools 10) Integrate ENNTool code in the form of OpenGL-based animation window (see 13) and 14))
11) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...) 11) Composition, parametrisation & keying of tools from higher-order operators (brushes, functions, filters, outlines, patterns & shaders) and unit tools
12) GUI TODO list: 12) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
13) GUI TODO list:
a) switch to Gtk a) switch to Gtk
b) replace logo w/ canvas panel in About dialogue b) replace logo w/ canvas panel in About dialogue
c) Settings/Settings window (e.g. autosave, hide cursor on leaving window, ...) c) Settings/Settings window (e.g. autosave, hide cursor on leaving window, ...)
d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3) d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3)
Release roadmap: Release roadmap:
1) BUG: fix & finish Arabic/RTL text tool support 1) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object}
2) BUG: a) text tool b) paste text c) undo 2) BUG: a) apply tool b) move cursor c) undo d) cursor artifacts
3) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object} 3) add hotkeys.txt mIRC art canvas to help menu
4) add hotkeys.txt mIRC art canvas to help menu 4) operators: crop, scale, shift, slice
5) operators: crop, scale, shift, slice 5) auto{load,save} & {backup,restore}
6) auto{load,save} & {backup,restore} 6) tools: unicode block elements
7) tools: unicode block elements 7) floating/dockable toolbar
8) floating/dockable toolbar
vim:ff=dos tw=0 vim:ff=dos tw=0

View File

@ -11,5 +11,6 @@
(Canvas) <Down>, <Left>, <Right>, <Up> Move canvas cursor (Canvas) <Down>, <Left>, <Right>, <Up> Move canvas cursor
(Canvas) <Left mouse button>, <Space> Apply current tool with foreground colour or initiate tool action (line and object tool) (Canvas) <Left mouse button>, <Space> Apply current tool with foreground colour or initiate tool action (line and object tool)
(Canvas) <Right mouse button> Apply current tool with background colour (Canvas) <Right mouse button> Apply current tool with background colour
(Erase tool) <Right mouse button> Erase background colour with foreground colour
(Fill tool) <Ctrl> <Left mouse button>, <Right mouse button> Fill entire region ignoring character cells (Fill tool) <Ctrl> <Left mouse button>, <Right mouse button> Fill entire region ignoring character cells
(Object tool) <Ctrl> <Left mouse button> Move selection instead of cloning (Object tool) <Ctrl> <Left mouse button> Move selection instead of cloning

View File

@ -13,21 +13,25 @@ class ToolErase(Tool):
# onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown)
def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown):
brushColours, brushSize, dirty = list(brushColours), list(brushSize), False brushColours, brushSize, dirty = list(brushColours), list(brushSize), False
if mouseRightDown:
brushColours = [brushColours[0], brushColours[0]]
else:
brushColours = [brushColours[1], brushColours[1]]
if brushSize[0] > 1: if brushSize[0] > 1:
brushSize[0] *= 2 brushSize[0] *= 2
for brushRow in range(brushSize[1]): for brushRow in range(brushSize[1]):
for brushCol in range(brushSize[0]): for brushCol in range(brushSize[0]):
patchColours = [brushColours[1]] * 2 if mouseLeftDown:
patch = [mapPoint[0] + brushCol, mapPoint[1] + brushRow, *patchColours, 0, " "] patch = [mapPoint[0] + brushCol, mapPoint[1] + brushRow, brushColours[1], brushColours[1], 0, " "]
if mouseLeftDown or mouseRightDown: if not dirty:
dirty = True
dispatchFn(eventDc, False, patch); dispatchFn(eventDc, True, patch);
elif mouseRightDown \
and ((mapPoint[0] + brushCol) < canvas.size[0]) \
and ((mapPoint[1] + brushRow) < canvas.size[1]) \
and (canvas.map[mapPoint[1] + brushRow][mapPoint[0] + brushCol][1] == brushColours[1]):
patch = [mapPoint[0] + brushCol, mapPoint[1] + brushRow, canvas.map[mapPoint[1] + brushRow][mapPoint[0] + brushCol][0], brushColours[0], *canvas.map[mapPoint[1] + brushRow][mapPoint[0] + brushCol][2:]]
if not dirty: if not dirty:
dirty = True dirty = True
dispatchFn(eventDc, False, patch); dispatchFn(eventDc, True, patch); dispatchFn(eventDc, False, patch); dispatchFn(eventDc, True, patch);
else: else:
patch = [mapPoint[0] + brushCol, mapPoint[1] + brushRow, brushColours[1], brushColours[1], 0, " "]
dispatchFn(eventDc, True, patch) dispatchFn(eventDc, True, patch)
return True, dirty return True, dirty