Tim Ledbetter
f132751fae
PixelPaint: Ensure the selection is always within image bounds
2023-05-05 16:35:42 +01:00
snooze6214
d3353ee0e7
PixelPaint: Add action to invert selection
2022-10-18 18:57:12 +02:00
Andreas Kling
49deb936be
PixelPaint: Make selection changes undoable
...
Using the Rectangle Select Tool will now generate undo/redo commands
like any other tool. :^)
2022-08-26 01:04:52 +02:00
Andreas Kling
d571159aeb
PixelPaint: Move selection from ImageEditor to Image
...
This is preparation for making selection state undoable.
2022-08-26 01:04:52 +02:00
Andreas Kling
67596d9546
PixelPaint: Move "marching ants" painting logic to ImageEditor
...
Since this code needs to look at a bunch of ImageEditor state anyway,
it makes more sense for it to live in ImageEditor.
2022-08-26 01:04:52 +02:00
Mustafa Quraish
7974fee800
PixelPaint: Inherit from AbstractZoomPanWidget
2022-01-14 01:02:34 +01:00
Marcus Nilsson
3b3df40eb9
PixelPaint: Revert update rect tightening for Selection
...
Tightening of the update rect when firing the marching ants timer
unfortunately meant that only finalized selections would be redrawn,
and any new selection drawn outside of the update rect would not
update.
2021-08-14 12:45:48 +02:00
Marcus Nilsson
854e16797e
PixelPaint: Tighten update rects for Tools
...
This tightens the update rects for EraseTool, BrushTool And the marching
ants update in Selection. Inflate Selection update rect by 10x10 to
avoid misalignment when zoomed out.
2021-08-08 13:55:39 +02:00
Davipb
22585e2845
PixelPaint: Expose more complex selection operations
...
Now that we use RectMask internally to store the selection, we can
expose more powerful APIs to allow for better control over the image
selection.
2021-06-22 11:00:00 +02:00
Davipb
d922e35579
PixelPaint: Use Mask internally in Selection
...
While the external API has not changed, this will allow us to have
non-rectangular selections in the future.
2021-06-22 11:00:00 +02:00
Mateusz Górzyński
4aff4249aa
PixelPaint: Alternate selection outline between black and white
2021-06-15 16:15:09 +02:00
Andreas Kling
fa7bb98b1e
PixelPaint: No need to pass ImageEditor& to Selection::paint()
...
It already has a reference to the editor in m_editor.
2021-06-15 01:16:34 +02:00
LepkoQQ
db99e0917c
PixelPaint: Add menu items for Select All and Clear Selection
...
We also need to update the image editor when clearing selection
otherwise the last state of the selection will be displayed until an
update happens.
2021-06-15 00:13:03 +02:00
Andreas Kling
068ca3a394
PixelPaint: Always animate marching ants during interactive selection
...
The Selection object now tracks whether there is an ongoing interactive
selection (originating from one of the selection tools). If so it makes
sure to pump the marching ants animation.
2021-06-14 18:25:17 +02:00
Andreas Kling
4cecd79000
PixelPaint: Draw the current editor selection as marching ants
...
This patch moves the marching ants painting code to Selection and
unifies the timer mechanism so that all marching ants are synchronized
which looks neat. :^)
2021-06-14 18:25:17 +02:00
Andreas Kling
1b897ec561
PixelPaint: Add a Selection class (ImageEditor has a Selection)
...
This will represent a complex, region-based selection in the future.
For now though, it's just a simple rectangle. :^)
2021-06-14 18:25:17 +02:00