renderer: propagate picture blending to internal scene

Users can regard a picture and its nested scene as
a single entity, so blending options can be properly
applied to the actual visual paint object.
This commit is contained in:
Hermet Park 2025-07-17 14:38:30 +09:00 committed by Hermet Park
parent bc4afd8ef7
commit a80b0aa188

View file

@ -98,6 +98,7 @@ struct PictureImpl : Picture
resizing = false;
}
needComposition(opacity);
vector->blend(pImpl->blendMethod); //propagate blend method to nested vector scene
return vector->pImpl->update(renderer, transform, clips, opacity, flag, false);
}
return true;
@ -248,10 +249,11 @@ struct PictureImpl : Picture
bool render(RenderMethod* renderer)
{
auto ret = true;
renderer->blend(impl.blendMethod);
if (bitmap) return renderer->renderImage(impl.rd);
else if (vector) {
if (bitmap) {
renderer->blend(impl.blendMethod);
return renderer->renderImage(impl.rd);
} else if (vector) {
RenderCompositor* cmp = nullptr;
if (impl.cmpFlag) {
cmp = renderer->target(bounds(renderer), renderer->colorSpace(), impl.cmpFlag);