On Thu, 1 May 2025 17:59:23 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   sealed
>
> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 2100:
> 
>> 2098:      * While there is no general guarantee that successive invocations 
>> of this method return the same instance,
>> 2099:      * it is safe to either cache this object or call this method each 
>> time, since the information obtained from
>> 2100:      * this lightweight object remains valid until the next layout 
>> cycle.
> 
> I'm trying to parse this to get a better idea of the model. If this really is 
> a "view" into the current layout information for the text node, then the 
> information returned by the getters in the TextLayout will change over time, 
> right?
> 
> This is true whether you call the TextLayoutInfo once on a given text node 
> and reuse it for the life of that text node or whether you call 
> `Text::getLayoutInfo` every time you want to use it. I guess that's what you 
> are trying to say. If so, is there a need to mention that there is no 
> guarantee that it will return the same instance?

good comment.  how does this sound:

Returns the object which provides a snapshot of the text layout geometry for 
this node.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r2071898115

Reply via email to