On Wed, 10 Feb 2021 18:46:33 GMT, Phil Race wrote:
>> From what I can tell, if clip is null, then calling clip(null) has no effect.
>> And it won't throw an NPE in that case. So the proposed documentation is
>> less accurate than no documentation at all.
>> And I would shy away from changing
On Wed, 10 Feb 2021 18:30:18 GMT, Phil Race wrote:
>> As per code
>> public void setClip(Shape sh) {
>> usrClip = transformShape(sh);
>>
>> usrClip is set to null if "sh" is null so clip is cleared...I will update
>> the setClip doc too..
>
> From what I can tell, if clip is null,
On Wed, 10 Feb 2021 06:01:59 GMT, Prasanta Sadhukhan
wrote:
>> The API doc for Graphics2D.clip(shape s) claims that passing a null argument
>> would actually clear the existing clipping area, which is incorrect.
>> This statement is applicable only to G2D.setClip() and not for the clip()
>>
On Wed, 10 Feb 2021 04:51:33 GMT, Prasanta Sadhukhan
wrote:
>> If "*setClip*(null)" has to clear the clip then it should be specified,
>> currently, that method said nothing about the null parameter.
>
> As per code
> public void setClip(Shape sh) {
> usrClip = transformShape(sh);
>
> The API doc for Graphics2D.clip(shape s) claims that passing a null argument
> would actually clear the existing clipping area, which is incorrect.
> This statement is applicable only to G2D.setClip() and not for the clip()
> method. G2D.clip() would throw a NullPointerException when it