On Tue, 18 Aug 2026 23:51:46 GMT, Michael Strauß <[email protected]> wrote:
>> Pixel snapping is really hard to get right (in fact, it's so hard that even >> JavaFX itself gets it wrong in so many places). >> I've compiled a list of things that I've learned, because there isn't really >> any good documentation as of yet. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Michael Strauß has updated the pull request incrementally with one additional > commit since the last revision: > > remove empty tag modules/javafx.graphics/src/main/java/javafx/scene/layout/package-info.java line 369: > 367: * double top = snapSpaceY(margin.getTop()); // Correct > 368: * > 369: * double top = snapSpaceX(margin.getTop()); // Incorrect axis wonder if we should remove incorrect examples here as well. modules/javafx.graphics/src/main/java/javafx/scene/layout/package-info.java line 421: > 419: * double childX = snapPositionX(snappedLeftInset() + > allocatedWidth); > 420: * > 421: * // Incorrect: snapSizeX can turn floating-point noise into an > extra pixel I am wondering if we should remove incorrect examples (there are many more ways to produce an incorrect result). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2260#discussion_r3816014839 PR Review Comment: https://git.openjdk.org/jfx/pull/2260#discussion_r3815991204
