On Tue, 9 Feb 2021 12:54:26 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> The spec says "s - the Shape to be intersected with the current Clip" so I 
>> assume it means there should be a current clip set, so that is why I have 
>> used setClip to "set" a clip. So, setClip() should be there as far I see.
>
> Also, if there is no clip set, then the spec statement " If s is null, this 
> method clears the current Clip" does not carry any meaning, so in both 
> regard, setClip() should be there, I presume.

@prsadhuk At first glance i also thought clip() should be called after calling 
setClip() but that is not the case.

If we see SunGraphics2D implementation of clip() we dont exit if there is no 
clip(usrClip object) is set using setClip(). So clip() doesnt depend on whether 
setClip() is used or not.

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

PR: https://git.openjdk.java.net/jdk/pull/2476

Reply via email to