Splash: Fix wrong x adjustment during clipping
If a line segment goes beyond the current clip region, Splash::strokeNarrow
tries to cut off the segment line to the intersection of the segment line with the clip border.
Therefore it has to calculate a new endpoint (=intersection point) of the segment. It does this by using the known segment slope dxdy.
Required information (segment start, segment slope, clip border) is known in double precision. However the calculation used the integerized clip border, which necessarily suffers from rounding errors. This error can become very visible when we have a high dxdy (i.e, a flat-angle line).
Use SplashClip::getYMin
and SplashClip::getYMax
instead of getYMinI
and getYMaxI
, and we get visibly correct results.
Fixes #990 (closed).