mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-27 06:35:16 +00:00
Fix DocumentApi::move/copyCel(): copy background cels instead of composite them
This commit is contained in:
parent
c4dd3f6f65
commit
bd3fcd3fc6
@ -721,9 +721,13 @@ void DocumentApi::moveCel(
|
|||||||
if (srcLayer == dstLayer) {
|
if (srcLayer == dstLayer) {
|
||||||
if (dstLayer->isBackground()) {
|
if (dstLayer->isBackground()) {
|
||||||
ASSERT(dstImage);
|
ASSERT(dstImage);
|
||||||
if (dstImage)
|
if (dstImage) {
|
||||||
|
int blend = (srcLayer->isBackground() ?
|
||||||
|
BLEND_MODE_COPY: BLEND_MODE_NORMAL);
|
||||||
|
|
||||||
composite_image(dstImage, srcImage,
|
composite_image(dstImage, srcImage,
|
||||||
srcCel->x(), srcCel->y(), 255, BLEND_MODE_NORMAL);
|
srcCel->x(), srcCel->y(), 255, blend);
|
||||||
|
}
|
||||||
|
|
||||||
clearImage(srcImage, bgColor(srcLayer));
|
clearImage(srcImage, bgColor(srcLayer));
|
||||||
}
|
}
|
||||||
@ -785,9 +789,13 @@ void DocumentApi::copyCel(
|
|||||||
if (dstLayer->isBackground()) {
|
if (dstLayer->isBackground()) {
|
||||||
if (srcCel) {
|
if (srcCel) {
|
||||||
ASSERT(dstImage);
|
ASSERT(dstImage);
|
||||||
if (dstImage)
|
if (dstImage) {
|
||||||
|
int blend = (srcLayer->isBackground() ?
|
||||||
|
BLEND_MODE_COPY: BLEND_MODE_NORMAL);
|
||||||
|
|
||||||
composite_image(dstImage, srcImage,
|
composite_image(dstImage, srcImage,
|
||||||
srcCel->x(), srcCel->y(), 255, BLEND_MODE_NORMAL);
|
srcCel->x(), srcCel->y(), 255, blend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user