mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-18 20:36:43 +00:00
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:
parent
bc4afd8ef7
commit
a80b0aa188
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue