RFR: 8316159: Update BoxLayout sample image for crispier edges
Phil Race
prr at openjdk.org
Thu Sep 21 22:43:11 UTC 2023
On Wed, 13 Sep 2023 09:17:16 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> **Problem**
>
> On a standard display with the scale of 100%, the BoxLayout sample has blurred edges.
>
> It is the result of how SVG is rendered: the strokes fall between the pixel grid, therefore a 1-pixel wide stroke is blurred between the previous and the following pixels with 50% of colour on each pixel. It doesn't look as good.
>
> **Fix**
>
> Move all rectangles half a pixel to make edges crisp. The edges of the rectangles look crisp in 100% and 200%.
>
> For more information see answers to the following questions on Stack Overflow:
>
> - [Why is my SVG line blurry or 2px in height when I specified 1px?](https://stackoverflow.com/a/34229584/572834)
> - [Avoiding lines between adjacent SVG rectangles](https://stackoverflow.com/a/23376793/572834)
Marked as reviewed by prr (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/15703#pullrequestreview-1638810904
More information about the client-libs-dev
mailing list