mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
renderer: rectified the fast track for clipping
- Issue was present when masking and clipping were applied simultaneously. In the case where the mask was in fastTrack mode and the clip was also clipped, the fastTrack was not reset, resulting in an incorrect rendering effect. - For rectangular clippers with a stroke width > 0, stroke clipping should be applied. However, the fastTrack mode was set instead, resulting in regular clipping instead of stroke clipping.
This commit is contained in:
parent
e2f1557de5
commit
f98057063b
1 changed files with 4 additions and 3 deletions
|
@ -250,12 +250,13 @@ RenderData Paint::Impl::update(RenderMethod* renderer, const Matrix& pm, Array<R
|
|||
viewport = renderer->viewport();
|
||||
/* TODO: Intersect the clipper's clipper, if both are FastTrack.
|
||||
Update the subsequent clipper first and check its ctxFlag. */
|
||||
if (!PAINT(this->clipper)->clipper && (compFastTrack = _compFastTrack(renderer, this->clipper, pm, viewport)) == Result::Success) {
|
||||
if (!PAINT(this->clipper)->clipper && SHAPE(this->clipper)->rs.strokeWidth() == 0.0f && _compFastTrack(renderer, this->clipper, pm, viewport) == Result::Success) {
|
||||
PAINT(this->clipper)->ctxFlag |= ContextFlag::FastTrack;
|
||||
}
|
||||
if (compFastTrack == Result::InsufficientCondition) {
|
||||
compFastTrack = Result::Success;
|
||||
} else {
|
||||
trd = PAINT(this->clipper)->update(renderer, pm, clips, 255, pFlag, true);
|
||||
clips.push(trd);
|
||||
compFastTrack = Result::InsufficientCondition;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue