Skip to content

WIP: Fix wrong clipping when rendering curves in Splash

Splash::strokeNarrow may detect clipping of y1 at yMaxI, even if it shouldn't clip because y1 and yMaxI actually stem from the same double precision y path value.

That's because y1 is calculated as (int)floor(y), while yMaxI is calculated as (int)ceil(y) - 1 in SplashClip::clipToRect. Results are sometimes different, depending on the exact double precision value.

When doing the clipping, x1 may get overly increased, leading to a too long span in x-direction. The high increment is likely an unrelated second issue, which I did not investigate here.

Fixes #990 (closed), because it avoids the "too much increment" situation in first place.

Merge request reports