@@ -687,19 +687,19 @@ private void setStrokeDiff(Stroke newStroke, Stroke oldStroke) {
687
687
if (newStroke == oldStroke ) {
688
688
return ;
689
689
}
690
- if (!(newStroke instanceof BasicStroke nStroke )) {
690
+ if (!(newStroke instanceof BasicStroke basicStroke )) {
691
691
return ;
692
692
}
693
693
boolean oldOk = (oldStroke instanceof BasicStroke );
694
694
BasicStroke oStroke = null ;
695
695
if (oldOk ) {
696
696
oStroke = (BasicStroke ) oldStroke ;
697
697
}
698
- if (!oldOk || nStroke .getLineWidth () != oStroke .getLineWidth ()) {
699
- cb .setLineWidth (nStroke .getLineWidth ());
698
+ if (!oldOk || basicStroke .getLineWidth () != oStroke .getLineWidth ()) {
699
+ cb .setLineWidth (basicStroke .getLineWidth ());
700
700
}
701
- if (!oldOk || nStroke .getEndCap () != oStroke .getEndCap ()) {
702
- switch (nStroke .getEndCap ()) {
701
+ if (!oldOk || basicStroke .getEndCap () != oStroke .getEndCap ()) {
702
+ switch (basicStroke .getEndCap ()) {
703
703
case BasicStroke .CAP_BUTT :
704
704
cb .setLineCap (0 );
705
705
break ;
@@ -710,8 +710,8 @@ private void setStrokeDiff(Stroke newStroke, Stroke oldStroke) {
710
710
cb .setLineCap (1 );
711
711
}
712
712
}
713
- if (!oldOk || nStroke .getLineJoin () != oStroke .getLineJoin ()) {
714
- switch (nStroke .getLineJoin ()) {
713
+ if (!oldOk || basicStroke .getLineJoin () != oStroke .getLineJoin ()) {
714
+ switch (basicStroke .getLineJoin ()) {
715
715
case BasicStroke .JOIN_MITER :
716
716
cb .setLineJoin (0 );
717
717
break ;
@@ -722,16 +722,16 @@ private void setStrokeDiff(Stroke newStroke, Stroke oldStroke) {
722
722
cb .setLineJoin (1 );
723
723
}
724
724
}
725
- if (!oldOk || nStroke .getMiterLimit () != oStroke .getMiterLimit ()) {
726
- cb .setMiterLimit (nStroke .getMiterLimit ());
725
+ if (!oldOk || basicStroke .getMiterLimit () != oStroke .getMiterLimit ()) {
726
+ cb .setMiterLimit (basicStroke .getMiterLimit ());
727
727
}
728
728
boolean makeDash ;
729
729
if (oldOk ) {
730
- if (nStroke .getDashArray () != null ) {
731
- if (nStroke .getDashPhase () != oStroke .getDashPhase ()) {
730
+ if (basicStroke .getDashArray () != null ) {
731
+ if (basicStroke .getDashPhase () != oStroke .getDashPhase ()) {
732
732
makeDash = true ;
733
733
} else {
734
- makeDash = !java .util .Arrays .equals (nStroke .getDashArray (), oStroke .getDashArray ());
734
+ makeDash = !java .util .Arrays .equals (basicStroke .getDashArray (), oStroke .getDashArray ());
735
735
}
736
736
} else {
737
737
makeDash = oStroke .getDashArray () != null ;
@@ -740,7 +740,7 @@ private void setStrokeDiff(Stroke newStroke, Stroke oldStroke) {
740
740
makeDash = true ;
741
741
}
742
742
if (makeDash ) {
743
- float [] dash = nStroke .getDashArray ();
743
+ float [] dash = basicStroke .getDashArray ();
744
744
if (dash == null ) {
745
745
cb .setLiteral ("[]0 d\n " );
746
746
} else {
@@ -751,7 +751,7 @@ private void setStrokeDiff(Stroke newStroke, Stroke oldStroke) {
751
751
cb .setLiteral (' ' );
752
752
}
753
753
cb .setLiteral (']' );
754
- cb .setLiteral (nStroke .getDashPhase ());
754
+ cb .setLiteral (basicStroke .getDashPhase ());
755
755
cb .setLiteral (" d\n " );
756
756
}
757
757
}
0 commit comments