RFR: 8280020: Underline and line-through not straight in WebView
Kevin Rushforth
kcr at openjdk.java.net
Sat Feb 12 17:09:09 UTC 2022
On Thu, 10 Feb 2022 11:36:38 GMT, Jay Bhaskar <duke at openjdk.java.net> wrote:
> Issue: The end point of line in drawLinesForText , add thickness to the endPoint.y(). In this case origin which is start point and the end point would not be same, and line would be drawn not straight.
> Solution: Do not add thickness to the y position of end point of line.
> Start Point(x,y) ----------End Point(x + width, 0)
OK, I get what you are saying now. The dashed line case -- which is the only case we will go through that loop more than once -- has at least two problems: it doesn't adjust the origin point of the segments as it loops through the dash pattern (a functional bug that also is a performance hit), and we set and restore the stroke style inside the loop; probably the right fix is to not loop at all, but rather use the stroke setting for dashed lines and call drawLine once. I will ask Jay to file a follow-up issue for this so we can track it as a separate issue.
For the problem with thickness, we either need to also file a new follow-up issue, or address it as part of this PR.
-------------
PR: https://git.openjdk.java.net/jfx/pull/731
More information about the openjfx-dev
mailing list