On Fri, 9 Oct 2026 21:29:59 GMT, Andy Goryachev <[email protected]> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fix review comments
>
> modules/javafx.graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java
>  line 889:
> 
>> 887:     }
>> 888: 
>> 889:     @Override
> 
> the superclass javadoc does not list the effect, which seems to be 
> saved/restored in this class.

See other comment, `DrawingContext` has effects now as well.

> modules/javafx.graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java
>  line 1544:
> 
>> 1542:     }
>> 1543: 
>> 1544:     @Override
> 
> this method inherits javadoc that contradicts implementation (as Effect is 
> also applied)

Solved now by changing the source of truth :)  `DrawingContext` now supports 
optional effects :)  See other comment.

> modules/javafx.graphics/src/main/java/javafx/scene/image/DrawingContext.java 
> line 1017:
> 
>> 1015:      * Clears a portion of the drawing surface with a transparent 
>> color value.
>> 1016:      * <p>
>> 1017:      * This method is not affected by any of the rendering attributes.
> 
> is this true?
> implementation seems to apply transform and clip.

Yeah, that's not correct. It should have said it that is affected by the 
transform and clip, and for GC also the effect.  Since I didn't want to have to 
override the docs for GC, I've also added effects support to the interface as 
an optional feature.  The software renderer doesn't support it (as with 
arbitrary clipping, this is a possibility to add in the future since it seems 
this is mostly handled in software anyway -- too big to add now though).

So the `DrawingContext` interface now also has a `setEffect` and `getEffect` 
method, and both  implement this; I added a better more traditional `getEffect` 
method since the one that GC had can't really work as intended and I didn't 
want to encode its `getEffect(Effect)` signature in the new interface.  The old 
one in GC could be a candidate for deprecation, but as it is harmless I've just 
left it as-is.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4307929761
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4307927034
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4307924224

Reply via email to