RFR: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture [v2]

Phil Race prr at openjdk.org
Tue Sep 19 18:15:42 UTC 2023


On Thu, 14 Sep 2023 18:52:09 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _‘quick ’_ is highlighted.
>> 
>> I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays.
>> 
>> I added a sentence that describes the image, which makes the documentation accessible and clearer.
>> 
>> Also, I marked up references to classes and members with `{@code}`.
>> 
>> Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)).
>
> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Moved all rects and lines 0.5 pixel
>   
>   The 'shape-rendering: crispEdges' did give crisp edges in 100% scale,
>   but in 200% scale some edges are 3-pixel wide and others are 2-pixel.
>   Using 0.5 pixel offset solves both problems. I verified rendering on
>   100%-scale display as well as on 150%- and 200%-scale displays.

Marked as reviewed by prr (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/15701#pullrequestreview-1633918934


More information about the client-libs-dev mailing list