On Mon, 17 Aug 2026 21:25:55 GMT, Michael Strauß <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/package-info.java
>> line 223:
>>
>>> 221: * <h2>Pixel Snapping</h2>
>>> 222: *
>>> 223: * In JavaFX, layout coordinates use {@code double} values, which
>>> means that a position or size can be fractional.
>>
>> I think it's the other way around: JavaFX supports fractional scale
>> (example: 125%) which means the logical coordinates cannot be integers.
>
> You probably mean that if the layout falls on physical pixel boundaries, then
> the logical coordinates might not be integers. That's right, but even more
> fundamentally, just by having coordinates be `double`, I can assign any
> non-integer value.
I mean cause-and-effect, especially at the start of the section.
The reason we have double is because of fractional scale, the rest is derived
from that fact.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2260#discussion_r3799095126