@@ -113,7 +113,7 @@ public void clear() {
113113
114114 private void doMiter ( int j , int k , double r ) {
115115 final double q = delta / r ;
116- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + (normals .get ( k ).getX () + normals .get ( j ).getX ()) * q ), ( int ) Math
116+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + (normals .get ( k ).getX () + normals .get ( j ).getX ()) * q ), Math
117117 .round ( srcPoly .get ( j ).getY () + (normals .get ( k ).getY () + normals .get ( j ).getY ()) * q ) ) );
118118 }
119119
@@ -175,7 +175,7 @@ else if (arcTolerance > Math.abs( delta ) * DEFAULT_ARC_TOLERANCE) {
175175 if (node .getJoinType () == JoinType .ROUND ) {
176176 double X = 1.0 , Y = 0.0 ;
177177 for (int j = 1 ; j <= steps ; j ++) {
178- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( 0 ).getY () + Y
178+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), Math .round ( srcPoly .get ( 0 ).getY () + Y
179179 * delta ) ) );
180180 final double X2 = X ;
181181 X = X * cos - sin * Y ;
@@ -185,7 +185,7 @@ else if (arcTolerance > Math.abs( delta ) * DEFAULT_ARC_TOLERANCE) {
185185 else {
186186 double X = -1.0 , Y = -1.0 ;
187187 for (int j = 0 ; j < 4 ; ++j ) {
188- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( 0 ).getY () + Y
188+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + X * delta ), Math .round ( srcPoly .get ( 0 ).getY () + Y
189189 * delta ) ) );
190190 if (X < 0 ) {
191191 X = 1 ;
@@ -249,10 +249,10 @@ else if (node.getEndType() == EndType.CLOSED_LINE) {
249249 LongPoint pt1 ;
250250 if (node .getEndType () == EndType .OPEN_BUTT ) {
251251 final int j = len - 1 ;
252- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j )
252+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j )
253253 .getY () + normals .get ( j ).getY () * delta ), 0 );
254254 destPoly .add ( pt1 );
255- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () - normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j )
255+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( j ).getX () - normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j )
256256 .getY () - normals .get ( j ).getY () * delta ), 0 );
257257 destPoly .add ( pt1 );
258258 }
@@ -282,10 +282,10 @@ else if (node.getEndType() == EndType.CLOSED_LINE) {
282282 }
283283
284284 if (node .getEndType () == EndType .OPEN_BUTT ) {
285- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () - normals .get ( 0 ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( 0 )
285+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () - normals .get ( 0 ).getX () * delta ), Math .round ( srcPoly .get ( 0 )
286286 .getY () - normals .get ( 0 ).getY () * delta ) );
287287 destPoly .add ( pt1 );
288- pt1 = new LongPoint ( ( int ) Math .round ( srcPoly .get ( 0 ).getX () + normals .get ( 0 ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( 0 )
288+ pt1 = new LongPoint ( Math .round ( srcPoly .get ( 0 ).getX () + normals .get ( 0 ).getX () * delta ), Math .round ( srcPoly .get ( 0 )
289289 .getY () + normals .get ( 0 ).getY () * delta ) );
290290 destPoly .add ( pt1 );
291291 }
@@ -310,12 +310,12 @@ private void doRound( int j, int k ) {
310310
311311 double X = normals .get ( k ).getX (), Y = normals .get ( k ).getY (), X2 ;
312312 for (int i = 0 ; i < steps ; ++i ) {
313- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + X * delta ), ( int ) Math .round ( srcPoly .get ( j ).getY () + Y * delta ) ) );
313+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + X * delta ), Math .round ( srcPoly .get ( j ).getY () + Y * delta ) ) );
314314 X2 = X ;
315315 X = X * cos - sin * Y ;
316316 Y = X2 * sin + Y * cos ;
317317 }
318- destPoly .add ( new LongPoint ( ( int ) Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), ( int ) Math .round ( srcPoly .get ( j ).getY ()
318+ destPoly .add ( new LongPoint ( Math .round ( srcPoly .get ( j ).getX () + normals .get ( j ).getX () * delta ), Math .round ( srcPoly .get ( j ).getY ()
319319 + normals .get ( j ).getY () * delta ) ) );
320320 }
321321
@@ -327,8 +327,8 @@ private void doSquare( int j, int k ) {
327327 final double sjx = srcPoly .get ( j ).getX ();
328328 final double sjy = srcPoly .get ( j ).getY ();
329329 final double dx = Math .tan ( Math .atan2 ( inA , nkx * njx + nky * njy ) / 4 );
330- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + delta * (nkx - nky * dx ) ), ( int ) Math .round ( sjy + delta * (nky + nkx * dx ) ), 0 ) );
331- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + delta * (njx + njy * dx ) ), ( int ) Math .round ( sjy + delta * (njy - njx * dx ) ), 0 ) );
330+ destPoly .add ( new LongPoint ( Math .round ( sjx + delta * (nkx - nky * dx ) ), Math .round ( sjy + delta * (nky + nkx * dx ) ), 0 ) );
331+ destPoly .add ( new LongPoint ( Math .round ( sjx + delta * (njx + njy * dx ) ), Math .round ( sjy + delta * (njy - njx * dx ) ), 0 ) );
332332 }
333333
334334 //------------------------------------------------------------------------------
@@ -442,7 +442,7 @@ private void offsetPoint( int j, int[] kV, JoinType jointype ) {
442442 final double cosA = nkx * njx + njy * nky ;
443443 if (cosA > 0 ) // angle ==> 0 degrees
444444 {
445- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + nkx * delta ), ( int ) Math .round ( sjy + nky * delta ), 0 ) );
445+ destPoly .add ( new LongPoint ( Math .round ( sjx + nkx * delta ), Math .round ( sjy + nky * delta ), 0 ) );
446446 return ;
447447 }
448448 //else angle ==> 180 degrees
@@ -455,9 +455,9 @@ else if (inA < -1.0) {
455455 }
456456
457457 if (inA * delta < 0 ) {
458- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + nkx * delta ), ( int ) Math .round ( sjy + nky * delta ) ) );
458+ destPoly .add ( new LongPoint ( Math .round ( sjx + nkx * delta ), Math .round ( sjy + nky * delta ) ) );
459459 destPoly .add ( srcPoly .get ( j ) );
460- destPoly .add ( new LongPoint ( ( int ) Math .round ( sjx + njx * delta ), ( int ) Math .round ( sjy + njy * delta ) ) );
460+ destPoly .add ( new LongPoint ( Math .round ( sjx + njx * delta ), Math .round ( sjy + njy * delta ) ) );
461461 }
462462 else {
463463 switch (jointype ) {
0 commit comments