Open jochenberger opened 2 years ago
I assume that there's something wrong with the com.openhtmltopdf.css.style.derived.FSLinearGradient.endPointsFromAngle(float, int, int)
method.
After some debugging, I think that the problem is that the wrong distance is passed to com.openhtmltopdf.pdfboxout.GradientHelper.buildType3Function(List<StopPoint>, float)
.
But I haven't yet figured out all of the math that's done there.
@siegelzc, do you think this is something we could address in the fork?
@siegelzc, do you think this is something we could address in the fork?
Of course. I'm not going to personally commit to implementing it though.
Consider the following HTML
All the divs should have a 5mm red bar at the bottom. But the result looks like this:
I think we can ignore the blur, that's probably https://github.com/mozilla/pdf.js/issues/10572. But at least the red bars should all have the same height since it's given in mm.
Btw, if you change the gradient to
to right
, all the bars have the same width:So it's probably got something to do with the y coordinates.