On Tue, 22 Sep 2026 21:29:51 GMT, Andy Goryachev <[email protected]> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Optimized dirty rect handling (benefits more than just SWDraingContext)
>
> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java 
> line 980:
> 
>> 978:         }
>> 979: 
>> 980:         path.setWindingRule(fillRule == FillRule.EVEN_ODD ? 
>> Path2D.WIND_EVEN_ODD : Path2D.WIND_NON_ZERO);
> 
> this overwrites the current winding rule - it it compatible with the API spec 
> in `DrawingContext` ?

It shouldn't do that, so I restore the rule now

> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java 
> line 982:
> 
>> 980:         path.setWindingRule(fillRule == FillRule.EVEN_ODD ? 
>> Path2D.WIND_EVEN_ODD : Path2D.WIND_NON_ZERO);
>> 981: 
>> 982:         graphics.setTransform(BaseTransform.IDENTITY_TRANSFORM);
> 
> will that work with non-uniform transform scaling or shear?
> also, what would happen if an absolute gradient or image patterns are used?
> 
> can we add these cases to the test?

I added tests (5 orso) to check this with gradient and image; it didn't work as 
expected, but is now fixed

> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java 
> line 1005:
> 
>> 1003:          */
>> 1004: 
>> 1005:         double scale = Math.sqrt(transform.getMxx() * 
>> transform.getMxx() + transform.getMyx() * transform.getMyx());
> 
> will it work correctly with a non-uniform scale?

No, it didn't; I added new tests to confirm the issue (and that it diverges 
from GraphicsContext) + fix

> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java 
> line 1097:
> 
>> 1095: 
>> 1096:     @Override
>> 1097:     public void fillText(String text, double x, double y, double 
>> maxWidth) {
> 
> what's the behavior of `fillText()` when `maxWidth` <= 0?

The parameter is ignored (not my preference, but GraphicsContext does this with 
almost everything, bad values are ignored or clamped), I documented this now.

> modules/javafx.graphics/src/main/java/javafx/scene/image/DrawingContext.java 
> line 226:
> 
>> 224:  *         <td class="colLast">
>> 225:  *             The method used to determine the interior of paths for a 
>> path fill or
>> 226:  *            clip operation.
> 
> minor: bad indent

fixed

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4176862617
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4176858207
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4176856422
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4176860809
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4176862934

Reply via email to