mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-24 23:28:57 +00:00
common paint: duplicate composition target.
composition target also copied in duplication. added missing part.
This commit is contained in:
parent
3a156b6307
commit
9e8410b9bd
1 changed files with 6 additions and 1 deletions
|
@ -198,9 +198,10 @@ namespace tvg
|
||||||
Paint* duplicate()
|
Paint* duplicate()
|
||||||
{
|
{
|
||||||
auto ret = smethod->duplicate();
|
auto ret = smethod->duplicate();
|
||||||
|
if (!ret) return nullptr;
|
||||||
|
|
||||||
//duplicate Transform
|
//duplicate Transform
|
||||||
if (ret && rTransform) {
|
if (rTransform) {
|
||||||
ret->pImpl->rTransform = new RenderTransform();
|
ret->pImpl->rTransform = new RenderTransform();
|
||||||
if (ret->pImpl->rTransform) {
|
if (ret->pImpl->rTransform) {
|
||||||
*ret->pImpl->rTransform = *rTransform;
|
*ret->pImpl->rTransform = *rTransform;
|
||||||
|
@ -210,6 +211,10 @@ namespace tvg
|
||||||
|
|
||||||
ret->pImpl->opacity = opacity;
|
ret->pImpl->opacity = opacity;
|
||||||
|
|
||||||
|
if (cmpTarget) ret->pImpl->cmpTarget = cmpTarget->duplicate();
|
||||||
|
|
||||||
|
ret->pImpl->cmpMethod = cmpMethod;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue