RFR: 8242861: Update ImagePattern to apply SVG pattern transforms [v7]
Arun Joseph
ajoseph at openjdk.java.net
Wed Nov 4 15:43:58 UTC 2020
On Tue, 3 Nov 2020 12:01:38 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> Arun Joseph has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix incorrect concat param order
>
> modules/javafx.graphics/src/main/java/com/sun/prism/impl/ps/PaintHelper.java line 754:
>
>> 752:
>> 753: BaseTransform paintXform = paint.getPatternTransformNoClone();
>> 754: if (paintXform != null) {
>
> Minor: Is the null check needed ? I could not find an instance where an object of `ImagePattern` is constructed using default constructor.
> If `ImagePattern.getPatternTransformNoClone()` could return null then should we do null check with other calls to `ImagePattern.getPatternTransformNoClone()` ? OR may be remove this null check.
The null check is not actually required as instances of `ImagePattern` can't have a null `patternTransform`. I added this check as `setLinearGradient` and `setRadialGradient` functions have also added them, when instances of `Gradient` can't have null as its transform. Should this null check be removed?
-------------
PR: https://git.openjdk.java.net/jfx/pull/190
More information about the openjfx-dev
mailing list