@@ -109,7 +109,7 @@ public void clear() {
109109
110110 private void doMiter ( int j , int k , double r ) {
111111 final double q = delta / r ;
112- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + (normals .get ( k ).getX () + normals .get ( j ).getX ()) * q ), ( int ) Math
112+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + (normals .get ( k ).getX () + normals .get ( j ).getX ()) * q ), Math
113113 .round ( srcPoly .get ( j ).getY () + (normals .get ( k ).getY () + normals .get ( j ).getY ()) * q ) ) );
114114 }
115115
@@ -171,7 +171,7 @@ else if (arcTolerance > Math.abs( delta ) * DEFAULT_ARC_TOLERANCE) {
171171 if (node .getJoinType () == JoinType .ROUND ) {
172172 double X = 1.0 , Y = 0.0 ;
173173 for (int j = 1 ; j <= steps ; j ++) {
174- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( 0 ).getY () + Y
174+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), Math .round ( srcPoly .get ( 0 ).getY () + Y
175175 * delta ) ) );
176176 final double X2 = X ;
177177 X = X * cos - sin * Y ;
@@ -181,7 +181,7 @@ else if (arcTolerance > Math.abs( delta ) * DEFAULT_ARC_TOLERANCE) {
181181 else {
182182 double X = -1.0 , Y = -1.0 ;
183183 for (int j = 0 ; j < 4 ; ++j ) {
184- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( 0 ).getY () + Y
184+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), Math .round ( srcPoly .get ( 0 ).getY () + Y
185185 * delta ) ) );
186186 if (X < 0 ) {
187187 X = 1 ;
@@ -245,10 +245,10 @@ else if (node.getEndType() == EndType.CLOSED_LINE) {
245245 LongPoint pt1 ;
246246 if (node .getEndType () == EndType .OPEN_BUTT ) {
247247 final int j = len - 1 ;
248- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j )
248+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j )
249249 .getY () + normals .get ( j ).getY () * delta ), 0 );
250250 destPoly .add ( pt1 );
251- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () - normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j )
251+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( j ).getX () - normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j )
252252 .getY () - normals .get ( j ).getY () * delta ), 0 );
253253 destPoly .add ( pt1 );
254254 }
@@ -278,10 +278,10 @@ else if (node.getEndType() == EndType.CLOSED_LINE) {
278278 }
279279
280280 if (node .getEndType () == EndType .OPEN_BUTT ) {
281- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () - normals .get ( 0 ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( 0 )
281+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () - normals .get ( 0 ).getX () * delta ), Math .round ( srcPoly .get ( 0 )
282282 .getY () - normals .get ( 0 ).getY () * delta ) );
283283 destPoly .add ( pt1 );
284- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + normals .get ( 0 ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( 0 )
284+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + normals .get ( 0 ).getX () * delta ), Math .round ( srcPoly .get ( 0 )
285285 .getY () + normals .get ( 0 ).getY () * delta ) );
286286 destPoly .add ( pt1 );
287287 }
@@ -306,12 +306,12 @@ private void doRound( int j, int k ) {
306306
307307 double X = normals .get ( k ).getX (), Y = normals .get ( k ).getY (), X2 ;
308308 for (int i = 0 ; i < steps ; ++i ) {
309- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( j ).getY () + Y * delta ) ) );
309+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + X * delta ), Math .round ( srcPoly .get ( j ).getY () + Y * delta ) ) );
310310 X2 = X ;
311311 X = X * cos - sin * Y ;
312312 Y = X2 * sin + Y * cos ;
313313 }
314- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j ).getY ()
314+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j ).getY ()
315315 + normals .get ( j ).getY () * delta ) ) );
316316 }
317317
@@ -323,8 +323,8 @@ private void doSquare( int j, int k ) {
323323 final double sjx = srcPoly .get ( j ).getX ();
324324 final double sjy = srcPoly .get ( j ).getY ();
325325 final double dx = Math .tan ( Math .atan2 ( inA , nkx * njx + nky * njy ) / 4 );
326- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + delta * (nkx - nky * dx ) ), ( int ) Math .round ( sjy + delta * (nky + nkx * dx ) ), 0 ) );
327- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + delta * (njx + njy * dx ) ), ( int ) Math .round ( sjy + delta * (njy - njx * dx ) ), 0 ) );
326+ destPoly .add ( new LongPoint ( Math .round ( sjx + delta * (nkx - nky * dx ) ), Math .round ( sjy + delta * (nky + nkx * dx ) ), 0 ) );
327+ destPoly .add ( new LongPoint ( Math .round ( sjx + delta * (njx + njy * dx ) ), Math .round ( sjy + delta * (njy - njx * dx ) ), 0 ) );
328328 }
329329
330330 //------------------------------------------------------------------------------
@@ -438,7 +438,7 @@ private void offsetPoint( int j, int[] kV, JoinType jointype ) {
438438 final double cosA = nkx * njx + njy * nky ;
439439 if (cosA > 0 ) // angle ==> 0 degrees
440440 {
441- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + nkx * delta ), ( int ) Math .round ( sjy + nky * delta ), 0 ) );
441+ destPoly .add ( new LongPoint ( Math .round ( sjx + nkx * delta ), Math .round ( sjy + nky * delta ), 0 ) );
442442 return ;
443443 }
444444 //else angle ==> 180 degrees
@@ -451,9 +451,9 @@ else if (inA < -1.0) {
451451 }
452452
453453 if (inA * delta < 0 ) {
454- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + nkx * delta ), ( int ) Math .round ( sjy + nky * delta ) ) );
454+ destPoly .add ( new LongPoint ( Math .round ( sjx + nkx * delta ), Math .round ( sjy + nky * delta ) ) );
455455 destPoly .add ( srcPoly .get ( j ) );
456- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + njx * delta ), ( int ) Math .round ( sjy + njy * delta ) ) );
456+ destPoly .add ( new LongPoint ( Math .round ( sjx + njx * delta ), Math .round ( sjy + njy * delta ) ) );
457457 }
458458 else {
459459 switch (jointype ) {
0 commit comments