RFR: 8311527: Region.snapInnerSpace*()
Kevin Rushforth
kcr at openjdk.org
Thu Sep 7 16:31:58 UTC 2023
On Thu, 7 Sep 2023 16:16:06 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> the javadoc was lifted almost verbatim from snapPortionX/Y (I did not find the words "given scale" though).
That's an internal method, not API docs.
> Changing to be the same as snapSizeX/Y, although, technically speaking, that description is not correct either: the value in both sets of methods is ceiled/floored for positive values and floored/ceiled for negative values.
Interesting. But I didn't mean to copy the entire thing, just the "to the nearest pixel" part (and don't say anything about scale, since we don't anywhere else).
As for the fact that snapSize doesn't say anything about what it does for negative values, that should be fixed in a follow-on bug.
> We might reword both cases saying something like "rounded to the nearest pixel with larger/smaller value" which will capture the behavior exactly. What do you think?
I wouldn't use the word "rounded" for a floor or ceiling operation, since it will be too confusing.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1190#discussion_r1318859766
More information about the openjfx-dev
mailing list