renderer: Fix paint transformation on scene change

issue: https://github.com/thorvg/thorvg/issues/2958
This commit is contained in:
lpogic 2024-11-16 00:05:03 +01:00 committed by Hermet Park
parent 96e8d3d7a2
commit a67f30de65

View file

@ -71,6 +71,10 @@ Result Scene::push(Paint* paint) noexcept
{ {
if (!paint) return Result::InvalidArguments; if (!paint) return Result::InvalidArguments;
paint->ref(); paint->ref();
//Relocated the paint to the current scene space
P(paint)->renderFlag |= RenderUpdateFlag::Transform;
pImpl->paints.push_back(paint); pImpl->paints.push_back(paint);
return Result::Success; return Result::Success;