Fix experimental "nonactive-layers opacity" mode for the SimpleRenderer

Regression introduced in 24846eae10
This commit is contained in:
David Capello 2023-05-05 22:11:19 -03:00
parent 8cdb4edcac
commit 8e91d22b70
2 changed files with 8 additions and 13 deletions

View File

@ -686,7 +686,7 @@ void Render::renderLayer(
renderPlan(
plan, dstImage, area,
frame, compositeImage,
true, true, blendMode, false);
true, true, blendMode);
}
void Render::renderSprite(
@ -789,8 +789,7 @@ void Render::renderSpriteLayers(Image* dstImage,
area, frame, compositeImage,
true,
false,
BlendMode::UNSPECIFIED,
false);
BlendMode::UNSPECIFIED);
// Draw onion skin behind the sprite.
if (m_onionskin.position() == OnionskinPosition::BEHIND)
@ -802,7 +801,7 @@ void Render::renderSpriteLayers(Image* dstImage,
area, frame, compositeImage,
false,
true,
BlendMode::UNSPECIFIED, false);
BlendMode::UNSPECIFIED);
}
void Render::renderBackground(Image* image,
@ -906,7 +905,7 @@ void Render::renderOnionskin(
// when opacity is < 255
(m_globalOpacity < 255 &&
m_onionskin.position() == OnionskinPosition::INFRONT),
true, blendMode, false);
true, blendMode);
}
}
}
@ -1003,8 +1002,7 @@ void Render::renderPlan(
const CompositeImageFunc compositeImage,
const bool render_background,
const bool render_transparent,
const BlendMode blendMode,
bool isSelected)
const BlendMode blendMode)
{
for (const auto& item : plan.items()) {
const Cel* cel = item.cel;
@ -1012,9 +1010,7 @@ void Render::renderPlan(
ASSERT(layer->isVisible()); // Hidden layers shouldn't be in the plan
if (m_selectedLayerForOpacity == layer)
isSelected = true;
const bool isSelected = (m_selectedLayerForOpacity == layer);
gfx::Rect extraArea;
bool drawExtra = false;

View File

@ -1,5 +1,5 @@
// Aseprite Render Library
// Copyright (c) 2019-2022 Igara Studio S.A.
// Copyright (c) 2019-2023 Igara Studio S.A.
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
@ -167,8 +167,7 @@ namespace render {
const CompositeImageFunc compositeImage,
const bool render_background,
const bool render_transparent,
const BlendMode blendMode,
bool isSelected);
const BlendMode blendMode);
void renderCel(
Image* dst_image,