Commit graph

9 commits

Author SHA1 Message Date
Andreas Kling
410cdba5a9 PaintBrush: Switch the active layer when clicking one with move tool
This feels very intuitive and nice, although maybe we need some way to
override this behavior for the scenario where you're intending to move
something currently behind something else.
2020-05-13 21:46:19 +02:00
Andreas Kling
96d03546ef PaintBrush: Make the line, rectangle and ellipsis preview work again
You can now see what you're drawing before committing to it. This works
by passing the second_paint_event from the ImageEditor to the tool.
We also pass the active layer which makes it easier for the tool to
keep his logic in layer-relative coordinates even while drawing preview
states directly into the ImageEditor backing bitmap.
2020-05-13 13:43:20 +02:00
Andreas Kling
06405e83d7 PaintBrush: Make ImageEditor forward keydown and keyup events to tool 2020-05-13 13:21:49 +02:00
Andreas Kling
55d96715ff PaintBrush: Make the ImageEditor accept focus 2020-05-13 13:21:49 +02:00
Andreas Kling
8882b6bd9a PaintBrush: Remove the PaintableWidget
Moved the current colors to ImageEditor for now, although I don't think
that will be their final home.
2020-05-13 13:21:47 +02:00
Andreas Kling
fbeaf76f96 PaintBrush: Update the LayerModel when moving layers around
This ensures that the layer table view always shows the correct
coordinates for the layer.
2020-05-13 00:21:13 +02:00
Andreas Kling
83d24dcb1d PaintBrush: Port all the existing toolbox tools to the Layer world :^)
Many tools are not working perfectly right yet, but we'll fix them!
2020-05-12 23:44:46 +02:00
Andreas Kling
35c2d389f5 PaintBrush: Show the layer stack in a table view on the right hand side 2020-05-12 23:00:23 +02:00
Andreas Kling
985c2550c1 PaintBrush: Start refactoring to support layer-based images
The main editing widget is now the new ImageEditor widget, which works
on an Image object, which internally has a stack of Layer objects.

Layers are composited back-to-front when painting the Image inside an
ImageEditor.
2020-05-12 22:22:45 +02:00