mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
sw_engine: fixing overlapping masks
The buffer to which the mask is rastered is only partially cleared. If the object to which the mask is applied overlaps an area where another mask was used, an erroneous image is generated. The buffer clearing area has been increased to the size of the object to which the mask is applied.
This commit is contained in:
parent
d7b3f0103e
commit
6601c93899
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ bool Paint::Impl::render(RenderMethod& renderer)
|
|||
/* Note: only ClipPath is processed in update() step.
|
||||
Create a composition image. */
|
||||
if (cmpTarget && cmpMethod != CompositeMethod::ClipPath) {
|
||||
auto region = cmpTarget->pImpl->bounds(renderer);
|
||||
auto region = smethod->bounds(renderer);
|
||||
if (region.w == 0 || region.h == 0) return false;
|
||||
cmp = renderer.target(region);
|
||||
renderer.beginComposite(cmp, CompositeMethod::None, 255);
|
||||
|
|
Loading…
Add table
Reference in a new issue