mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-03 21:46:20 +00:00
Reduce the area generated for cmd::CopyRegion when we move a selection
This commit is contained in:
parent
4aa56ff703
commit
3159acdc5c
@ -453,8 +453,14 @@ void PixelsMovement::stampImage()
|
|||||||
TiledMode::NONE, m_transaction,
|
TiledMode::NONE, m_transaction,
|
||||||
ExpandCelCanvas::None);
|
ExpandCelCanvas::None);
|
||||||
|
|
||||||
// TODO can we reduce this region?
|
// We cannot use cel->bounds() because cel->image() is nullptr
|
||||||
gfx::Region modifiedRegion(expand.getDestCanvas()->bounds());
|
gfx::Rect modifiedRect(
|
||||||
|
cel->x(),
|
||||||
|
cel->y(),
|
||||||
|
image->width(),
|
||||||
|
image->height());
|
||||||
|
|
||||||
|
gfx::Region modifiedRegion(modifiedRect);
|
||||||
expand.validateDestCanvas(modifiedRegion);
|
expand.validateDestCanvas(modifiedRegion);
|
||||||
|
|
||||||
expand.getDestCanvas()->copy(
|
expand.getDestCanvas()->copy(
|
||||||
|
Loading…
Reference in New Issue
Block a user