Commit Graph

62 Commits

Author SHA1 Message Date
Lucio Andrés Illanes Albornoz 76e57bd081 Improve backend latency and throughput via batching.
assets/text/TODO: updated.
libtools/ToolLine.py: reflect brush width in pre-line dragging cursor.
2019-09-26 22:38:28 +02:00
Lucio Andrés Illanes Albornoz 86e2c9e904 Various bugfixes & usability improvements.
1) Correctly unmask cursor and dispatch delta patches on successful {re,un}do.
2) Don't prompt to save twice on exit via Exit {accelerator,menu item}.
3) Fix cursor artifacts by always resetting origin point on DC whilst unmasking cursor cells.
4) Fix {re,un}do {accelerator,{menu,toolbar} item} desynchronisation with actual canvas journal undo level.
5) Remove scattered remnants of initial implementation of unimplemented italic support.
6) Replace rendering transparent cursor w/ manual blending over wx.GraphicsContext() due to canvas bitmap masking & performance degradation.

assets/text/TODO: updated.
2019-09-26 14:06:11 +02:00
Lucio Andrés Illanes Albornoz 50c9d69309 Fix underlined cells rendering line width. 2019-09-24 17:59:51 +02:00
Lucio Andrés Illanes Albornoz 9eec4f58ab Increase roar window height to match default canvas size.
{assets/tools,lib{canvas,gui,roar,rtl,tools}}/*.py: remove Vim fold marker remnants.
2019-09-24 17:02:02 +02:00
Lucio Andrés Illanes Albornoz a2295d1cfc Various bugfixes & usability improvements.
1) Directly render characters to canvas DC w/ clipping.
2) Fix background colour toolbar icon bitmaps.
3) Line tool: correctly set brush colours whenever updated.
4) Line tool: fix artifacts bug.
5) Render tool cursor transparently at opacity 200 (out of 255.)

assets/text/TODO: updated.
2019-09-24 14:03:16 +02:00
Lucio Andrés Illanes Albornoz 9c03910420 Fix canvas windows size regarding scrollbars. 2019-09-23 20:24:18 +02:00
Lucio Andrés Illanes Albornoz bff70b409b {assets/tools,lib{canvas,gui,roar,rtl,tools}}/*.py: fix formatting. 2019-09-23 19:21:06 +02:00
Lucio Andrés Illanes Albornoz f504fa2b76 Various bugfixes & usability improvements.
1)  Add background colour toolbar beneath (foreground) colour toolbar.
2)  Add colour flipping command w/ {accelerator,{menu,toolbar} item}.
3)  Add {de,in}crease {brush,canvas} size accelerator.
4)  Add {hide,show} assets window toolbar item.
5)  Circle tool: draw outline with foreground colour.
6)  Circle tool: honour transparency.
7)  Fill tool: change comprehensive fill modifier key from <Shift> to <Ctrl>.
8)  Fill tool: fill with {back,fore}ground colour given <[RL]MB>
9)  Fix arrow keys cursor motion when scrolled down.
10  Instantly reflect {brush size,colour,tool} changes in canvas.
11) Object tool: honour transparency w/ non-external objects.
12) Object tool: update selection rectangle during <LMB> whilst dragging, set w/ release of <LMB>.
13) Rectangle tool: draw outline with foreground colour.
14) Rectangle tool: honour transparency.
15) Replace wx.ToolBar() w/ wx.lib.agw.aui.AuiToolBar() & custom wx.lib.agw.aui.AuiDefaultToolBarArt().
16) Restore scrolling position after resizing canvas.

.TODO: deleted.
assets/audio/roar{arab8,spoke11}.wav: added.
assets/text/hotkeys.txt: added to document hotkeys.
assets/text/requirements.txt, requirements.txt: moved.
assets/text/TODO: updated.
{assets/tools,lib{canvas,gui,roar,rtl,tools}}/*.py: remove Vim fold markers.
libroar/RoarCanvasCommandsFile.py:_importFile(): update wx.FileDialog() message.
libroar/RoarCanvasCommandsOperators.py:canvasOperator(): update invert colours {caption,label}.
2019-09-23 18:49:33 +02:00
Lucio Andrés Illanes Albornoz 1c82e723c1 Implements foreground colour accelerators.
libgui/GuiFrame.py:onMenu(): don't call wx.SafeYield() because wxPython doesn't actually know what it wants from you EVER.
libroar/RoarCanvasCommands.py:update(): select tool corresponding to new foreground colour on change thereof.
libroar/RoarCanvasCommandsEdit.py:canvasColour(): specify <Control> <[0-9]> & <Control> <Shift> <[0-5]> accelerators.
libroar/RoarCanvasCommandsEdit.py:canvasColourAlpha(): specify <Control> <Shift> 6 accelerator.
2019-09-16 17:13:55 +02:00
Lucio Andrés Illanes Albornoz 3dae6dadde Decisively vanquish the lion's share of ftupid fucking fcrolling.
libgui/GuiCanvasWxBackend.py: rOAorAoARRAORA ROaroAR RAOAr roar RAOAAAR...
libroar/Roar{AssetsWindow,Canvas{CommandsOperators,Window}}.py: RoaWORAROORAOARORARARRA!!
libtools/Tool{,Circle,Fill,Line,Object,Rect,Text}.py: ROAOaRoaROAROAROOAAAARORORAOR?
assets/text/TODO: updated.
2019-09-16 16:54:07 +02:00
Lucio Andrés Illanes Albornoz deba33deba Initial implementation of Arabic character reshaping & handling.
libgui/GuiCanvasWxBackend.py:{arabicShapes{},_reshapeArabic()}: initial implementation.
libgui/GuiCanvasWxBackend.py:draw{CursorMaskWithJournal,Patch}(): update type signature.
libgui/GuiCanvasWxBackend.py:drawPatch(): call _reshapeArabic() on Arabic character patches.
libroar/Roar{Assets,Canvas}Window.py: pass updated set of arguments to backend.draw{CursorWithMask,Patch}().
libtools/ToolText.py:{arabicRegEx{},_checkRtl()}: initial implementation.
libtools/ToolText.py:_processKeyChar(): call _checkRtl().
libtools/ToolText.py:onKeyboardEvent(): initial implementation of RTL backspace support.
assets/text/TODO: updated.
2019-09-16 14:13:44 +02:00
Lucio Andrés Illanes Albornoz 70d7995b20 Fix underlined cells rendering.
libgui/GuiCanvasWxBackend.py: FUCK YOU WXPYTHON
assets/text/TODO: updated.
2019-09-16 08:39:55 +02:00
Lucio Andrés Illanes Albornoz 78b567d42b Fix assets management canvas panel scrolling.
libgui/GuiWindow.py: ONCE, THERE WAS A _LETHALLY FUCKING WOUNDED_ WXPYTHON
libroar/RoarAssetsWindow.py: ON THE VERY EDGE OF ITS MISERABLE EXISTENCE
libroar/RoarCanvasWindow.py: BECAUSE A LION VICIOUSLY MAULED IT AND TORTURED IT FOR 392 DAYS AND TWO (2) SECONDS
2019-09-15 16:54:19 +02:00
Lucio Andrés Illanes Albornoz a40017b607 Implements object tool operators context menu.
libgui/GuiFrame.py: _FUCK_ _YOU_ WXPYTHON
libroar/RoarCanvasCommandsOperators.py: I _FUCKING_ _HATE_ WXPYTHON
libroar/RoarCanvasWindow.py: DIE IN A DITCH WXPYTHON YOU ROTTING PILE OF FUCKING HIPPOPOTAMUS SHIT
libroar/RoarClient.py: I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON
2019-09-15 13:52:44 +02:00
Lucio Andrés Illanes Albornoz 245925406e libgui/GuiFrame.py:{_init,load}Menu(): split from loadMenu(), implement nested (sub)menus.
libroar/RoarCanvasCommandsEdit.py: put {brush,canvas} size commands into submenu.
libroar/RoarCanvasCommandsFile.py: put {ex,im}port commands into submenu.
assets/text/TODO: updated.
2019-09-15 12:41:14 +02:00
Lucio Andrés Illanes Albornoz 25c9e88484 libgui/GuiCanvasWxBackend.py:resize(): set font size from cellSize[0] + 1 vs. hard-wired 8.
libroar/RoarCanvasWindow.py:{onMouseWheel,__init__}(): {de,in}crease cell size w/ <Ctrl> <Mouse Wheel>.
assets/text/TODO: updated.
2019-09-14 15:44:17 +02:00
Lucio Andrés Illanes Albornoz 0e4915351e libgui/GuiFrame.py:onMenu(): clear event queue after calling command function. 2019-09-14 15:20:20 +02:00
Lucio Andrés Illanes Albornoz bdc8bcd494 Implements recently used {directory,files} in {assets,application} windows & file dialogues.
libgui/GuiFrame.py:GuiSubMenuDecorator(): added.
libgui/GuiFrame.py:loadMenus(): process submenu menu items.
libroar/RoarCanvasCommandsFile.py:{_{load,push}Recent,canvasOpenRecent}(): initial implementation.
libroar/RoarCanvasCommandsFile.py:_import{,File}(): return pathname along w/ rc.
libroar/RoarCanvasCommandsFile.py:canvas{Open,SaveAs}(): call _pushRecent() post-{open,save}.
libroar/RoarCanvasCommandsFile.py:__init__(): updated.
librtl/RtlPlatform.py: added.
librtl/RtlPlatform.py:getLocalConfPathName(): initial implementation.
roar.py: manually call _loadRecent() & _pushRecent() post-import.
assets/text/TODO: updated.
2019-09-14 15:16:57 +02:00
Lucio Andrés Illanes Albornoz 74e2bf7f49 libgui/GuiCanvasWxBackend.py:GuiBufferedDC.__init__(): directly select buffer into DC.
libroar/RoarCanvasWindow.py:applyTool(): normalise mapPoint w/ viewRect if mapPoint != None.
2019-09-13 21:09:51 +02:00
Lucio Andrés Illanes Albornoz 2c8fa89eda libgui/GuiCanvasWxBackend.py:{resize,__init__}(): restrict external font loading to Windows (via sym.)
assets/text/TODO: updated.
2019-09-13 10:03:39 +02:00
Lucio Andrés Illanes Albornoz 6e470c93d0 libgui/GuiCanvasWxBackend.py: render transparent cells as dark grey `░'. 2019-09-12 21:01:06 +02:00
Lucio Andrés Illanes Albornoz 6e05238efa libcanvas/CanvasJournal.py:{begin,end,updateCurrentDeltas}(): {insert,delete,append} at patchesUndoLevel.
libgui/GuiWindow.py:{onEnterWindow,__init__}(): bind wx.EVT_ENTER_WINDOW.
libroar/RoarCanvasWindow.py:applyTool(): only call tool.onMouseEvent() if mouse has moved to another cell since the last dirtying call & update lastDirtyCell.
libroar/RoarCanvasWindow.py:{onEnterWindow,onLeaveWindow,__init__}(): reset lastDirtyCell.
libroar/RoarCanvasWindow.py:__init__():
assets/text/TODO: updated.
2019-09-12 16:24:53 +02:00
Lucio Andrés Illanes Albornoz b6c063c5d3 Initial implementation of assets window & external object tool.
libgui/GuiFrame.py:GuiMiniFrame(): added as sub-class of wx.MiniFrame().
libgui/GuiWindow.py:RoarCanvasWindowDropTarget(): initial implementation.
libgui/GuiWindow.py:__init__(): receive & pass optional style parameter.
libgui/GuiWindow.py:__init__(): set drop target.
libroar/RoarAssetsWindow.py: initial implementation.
libroar/RoarClient.py:__init__(): add RoarAssetsWindow().
libtools/ToolObject.py: initial implementation.
assets/text/TODO: updated.
2019-09-12 12:49:53 +02:00
Lucio Andrés Illanes Albornoz 99e746f090 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.
2019-09-12 11:26:17 +02:00
Lucio Andrés Illanes Albornoz 0f88a78639 libgui/GuiCanvasWxBackend.py:resize(): load font named by fontName instead of wx.FONTFAMILY_TELETYPE.
libgui/GuiCanvasWxBackend.py:__init__(): receive & set font{Name,PathName}.
libgui/GuiCanvasWxBackend.py:__init__(): call AddFontResourceW() in lieu of WxPython support FOR ANYTHING THAT GOES BEYOND BEING A BLOODY NON-STOP HINDRANCE.
2019-09-11 15:33:15 +02:00
Lucio Andrés Illanes Albornoz 418d16a81a libgui/GuiFrame.py:{load{Accel,Menu,ToolBar}s,__init__}(): replace lastId w/ wx.NewId(). 2019-09-11 14:45:59 +02:00
Lucio Andrés Illanes Albornoz 3be34bc657 libgui/GuiFrame.py:onMenu(): only dispatch events via itemsById[eventId] if present, skip otherwise. 2019-09-11 14:43:55 +02:00
Lucio Andrés Illanes Albornoz 6109e9b38c libgui/GuiCanvasWxBackend.py:GuiBufferedDC(): implement double-buffered wx.MemoryDC() honouring view{Rect,Size}.
libgui/GuiCanvasWxBackend.py:{getDeviceContext,onPaint}(): use GuiBufferedDC() if viewRect > (0, 0).
libroar/RoarCanvas{CommandsTools,Window}.py: updated.
assets/text/TODO: updated.
2019-09-11 09:39:36 +02:00
Lucio Andrés Illanes Albornoz bb23efac56 libgui/GuiFrame.py:loadAccels(): obtain from {menu,Toolbar}s[].
libroar/RoarCanvasCommands{,Edit,File,Help,Tools}.py: remove self.accels[].
libroar/RoarClient.py: updated.
2019-09-10 12:28:26 +02:00
Lucio Andrés Illanes Albornoz f23101f511 libgui/GuiFrame.py: updated.
libroar/RoarCanvasCommands{,Edit,File,Help,Tools}.py: split from libroar/RoarCanvasInterface.py.
libroar/RoarCanvasWindow.py: updated.
libroar/RoarClient.py: updated.
libroar/RoarWindowAbout.py: renamed from libroar/RoarClientAboutWindow.py.
roar.py: updated.
2019-09-10 12:06:56 +02:00
Lucio Andrés Illanes Albornoz 01ca10be21 libroar/RoarCanvasInterface.py, libgui/GuiCanvasInterface.py: split from libgui/GuiCanvasInterface.py.
libroar/RoarClientAboutWindow.py: merged from libgui/GuiCanvasInterfaceAbout.py.
libgui/GuiFrame.py:Gui{Command{,List},Select}Decorator(): moved from libroar/RoarCanvasInterface.py.
libroar/RoarClient.py: updated.
2019-09-10 10:22:02 +02:00
Lucio Andrés Illanes Albornoz 8fd0294ef8 libroar/RoarClient.py, libgui/GuiFrame.py: split from libgui/GuiFrame.py.
libroar/RoarCanvasWindow.py, libgui/GuiWindow.py: split from libgui/GuiCanvasPanel.py.
roar.py: updated.
2019-09-10 10:14:12 +02:00
Lucio Andrés Illanes Albornoz 116e5915dc libgui/GuiCanvasInterface.py:_import(): call reset{Cursor,Undo}() on journal after importing. 2019-09-09 20:10:52 +02:00
Lucio Andrés Illanes Albornoz 649f118b20 libgui/GuiCanvasInterfaceAbout.py: update legend. 2019-09-09 19:34:22 +02:00
Lucio Andrés Illanes Albornoz bfd8e17b2b libgui/GuiCanvasPanel.py:{onPanelScroll,__init__}(): reset cursor on EVT_SCROLLWIN_LINE{DOWN,UP}. 2019-09-09 19:03:14 +02:00
Lucio Andrés Illanes Albornoz 0fe6899d05 libcanvas/Canvas.py:dispatchPatchSingle(): cloned from dispatchPatch().
lib{canvas/Canvas{,Journal},gui/GuiCanvasPanel}.py: replace dirtyJournal & pushDeltas() w/ explicit {begin,end}().
libgui/GuiCanvasPanel.py:applyTool(): updated.
libgui/GuiCanvasPanel.py:dispatchPatchSingle(): cloned from dispatchPatch().
libtools/Tool{,Circle,Fill,Line,Rect,Select{,Clone,Move},Text}.py:on{Mouse,Keyboard}Event(): return rc, dirty.
libtools/ToolSelect{Clone,Move}.py:onSelectEvent(): return rc, dirty.
2019-09-09 18:43:33 +02:00
Lucio Andrés Illanes Albornoz b3f587fc73 libgui/GuiCanvasInterface.py:canvasTool(): call applyTool() w/ new tool post-selection.
libgui/GuiCanvasPanel.py:{applyTool,onPanelInput}(): split from onPanelInput().
libtools/Tool{,Circle,Fill,Line,Rect,Select,Text}.py:on{Keyboard,Mouse}Event(): updated.
libtools/ToolFill.py:onMouseEvent(): display cursor.
libtools/ToolSelect{,Clone,Move}.py:onSelectEvent(): updated.
2019-09-09 18:18:54 +02:00
Lucio Andrés Illanes Albornoz 1fe5db9fa6 libgui/GuiCanvasPanel.py:{onPanelSize,__init__}(): call _updateScrollBars() on EVT_SIZE. 2019-09-09 17:34:50 +02:00
Lucio Andrés Illanes Albornoz c2657eeefd libgui/GuiCanvasPanel.py:_updateScrollBars(): split from resize().
libgui/GuiCanvasPanel.py:_updateScrollBars(): reduce flickering induced by calling SetVirtualSize() when scrollbars are not required.
libgui/GuiCanvasPanel.py:{resize,update}(): updated.
libgui/GuiCanvasWxBackend.py:{reset,__init__}(): removes obsolete reset().
2019-09-09 17:27:37 +02:00
Lucio Andrés Illanes Albornoz 04430e7c0c lib{canvas,gui,rtl,tools}/*.py: remove trailing SP. 2019-09-09 12:46:52 +02:00
Lucio Andrés Illanes Albornoz 56a3b748cc libgui/GuiCanvasPanel.py:{onPanelEnterWindow,__init__}(): don't steal focus when entering window.
libgui/GuiCanvasPanel.py:__init__(): bind EVT_CHAR to self vs.  parentFrame.
libgui/GuiFrame.py:{onChar,__init__}(): forward EVT_CHAR to canvasPanel.onPanelInput().
2019-09-09 12:44:32 +02:00
Lucio Andrés Illanes Albornoz 88d69cb31e Initial canvas panel scrollbar implementation.
assets/text/TODO: updated.
libgui/GuiCanvasPanel.py:__init__(): provide self.winSize & call SetScrollRate().
libgui/GuiCanvasPanel.py:{_drawPatch,dispatch{DeltaPatches,Patch},onPanel{Input,LeaveWindow},resize,update}(): receive and/or pass viewRect.
libgui/GuiCanvasPanel.py:onPanelPaint(): updated.
libgui/GuiCanvasPanel.py:resize(): call SetVirtualSize().
libgui/GuiCanvasWxBackend.py:_{draw{Brush,Char}Patch,_get{Brush,Char}PatchColours,xlatePoint}(): updated.
libgui/GuiCanvasWxBackend.py:{draw{CursorMaskWithJournal,Patch},getDeviceContext,xlateEventPoint}(): receive and/or pass viewRect.
libgui/GuiCanvasWxBackend.py:getDeviceContext(): return ClientDC() if viewRect > (0, 0)
libgui/GuiCanvasWxBackend.py:onPanelPaintEvent(): blit subset of canvasBitmap into BufferedPaintDC() if viewRect > (0, 0).
libtools/Tool{,Circle,Fill,Line,Rect,Select{,Clone,Move},Text}.py: receive & pass viewRect to dispatchFn().
2019-09-09 12:30:25 +02:00
Lucio Andrés Illanes Albornoz e54429e29e libgui/GuiCanvasInterface.py: soft-fail importing ImgurApiKey.
assets/text/TODO: updated.
2019-09-08 20:05:34 +02:00
Lucio Andrés Illanes Albornoz 52672796c6 libgui/GuiCanvasInterface.py:canvas{Brush,Canvas}Size(): correctly {de,in}crement {brush,canvas} height & width. 2019-09-08 19:24:55 +02:00
Lucio Andrés Illanes Albornoz fcd5173329 {libcanvas/Canvas,libgui/GuiCanvasPanel}.py: neither commit nor draw patches referencing cells outside of the current map. 2019-09-08 19:04:27 +02:00
Lucio Andrés Illanes Albornoz b83684073e libgui/GuiCanvasInterface.py: minor cleanup. 2019-09-08 19:02:19 +02:00
Lucio Andrés Illanes Albornoz f6e2dbd64b libgui/GuiCanvasInterface.py: minor cleanup. 2019-09-08 18:34:30 +02:00
Lucio Andrés Illanes Albornoz c77813380a assets/text/ImgurApiKey.py.template, lib{canvas,gui,rtl,tools}/*.py: deXXXify. 2019-09-08 18:08:04 +02:00
Lucio Andrés Illanes Albornoz 6da84c05c5 {libcanvas/Canvas,libgui/GuiCanvas{Interface,Panel}}.py: implement dirty flag.
libgui/GuiCanvasInterface.py:canvas{Exit,New,Open,Save,Import{Ansi,FromClipboard,Sauce}}(): prompt to save canvas if dirty.
libgui/GuiCanvasInterface.py: minor cleanup.
libcanvas/Canvas.py:resize(): don't push undo patches when extending canvas.
2019-09-08 18:00:11 +02:00
Lucio Andrés Illanes Albornoz a628ed6471 Implements transparent colour.
libgui/Gui{CanvasInterface,{General,}Frame}.py: refactored.
{libcanvas/CanvasExportStore,libgui/GuiCanvas{Interface,WxBackend}}.py: implements transparent colour.
libgui/GuiCanvasPanel.py: updated.
libtools/ToolText.py: updated.
assets/text/TODO: updated.
2019-09-08 16:57:45 +02:00