poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1188233 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java
Date Mon, 24 Oct 2011 17:02:44 GMT
Author: sergey
Date: Mon Oct 24 17:02:43 2011
New Revision: 1188233

URL: http://svn.apache.org/viewvc?rev=1188233&view=rev
Log:
restore JDK5 compatibility

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java?rev=1188233&r1=1188232&r2=1188233&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java Mon Oct
24 17:02:43 2011
@@ -260,9 +260,9 @@ public class XSLFConnectorShape extends 
                 break;
             case ARROW:
                 GeneralPath arrow = new GeneralPath();
-                arrow.moveTo(-lineWidth * 3, -lineWidth * 2);
+                arrow.moveTo((float) (-lineWidth * 3), (float) (-lineWidth * 2));
                 arrow.lineTo(0, 0);
-                arrow.lineTo(-lineWidth * 3, lineWidth * 2);
+                arrow.lineTo((float) (-lineWidth * 3), (float) (lineWidth * 2));
                 shape = arrow;
                 at.translate(x2, y2);
                 at.rotate(alpha);
@@ -271,9 +271,9 @@ public class XSLFConnectorShape extends 
                 scaleY = tailWidth.ordinal() + 1;
                 scaleX = tailLength.ordinal() + 1;
                 GeneralPath triangle = new GeneralPath();
-                triangle.moveTo(-lineWidth * scaleX, -lineWidth * scaleY/2);
+                triangle.moveTo((float) (-lineWidth * scaleX), (float) (-lineWidth * scaleY
/ 2));
                 triangle.lineTo(0, 0);
-                triangle.lineTo(-lineWidth * scaleX, lineWidth * scaleY/2);
+                triangle.lineTo((float) (-lineWidth * scaleX), (float) (lineWidth * scaleY
/ 2));
                 triangle.closePath();
                 shape = triangle;
                 at.translate(x2, y2);
@@ -314,9 +314,9 @@ public class XSLFConnectorShape extends 
             case STEALTH:
             case ARROW:
                 GeneralPath arrow = new GeneralPath();
-                arrow.moveTo(lineWidth * 3 * scaleX, -lineWidth * scaleY * 2);
+                arrow.moveTo((float) (lineWidth * 3 * scaleX), (float) (-lineWidth * scaleY
* 2));
                 arrow.lineTo(0, 0);
-                arrow.lineTo(lineWidth * 3 * scaleX, lineWidth * scaleY * 2);
+                arrow.lineTo((float) (lineWidth * 3 * scaleX), (float) (lineWidth * scaleY
* 2));
                 shape = arrow;
                 at.translate(x1, y1);
                 at.rotate(alpha);
@@ -325,9 +325,9 @@ public class XSLFConnectorShape extends 
                 scaleY = headWidth.ordinal() + 1;
                 scaleX = headLength.ordinal() + 1;
                 GeneralPath triangle = new GeneralPath();
-                triangle.moveTo(lineWidth * scaleX, -lineWidth * scaleY/2);
+                triangle.moveTo((float) (lineWidth * scaleX), (float) (-lineWidth * scaleY
/ 2));
                 triangle.lineTo(0, 0);
-                triangle.lineTo(lineWidth * scaleX, lineWidth * scaleY/2);
+                triangle.lineTo((float) (lineWidth * scaleX), (float) (lineWidth * scaleY
/ 2));
                 triangle.closePath();
                 shape = triangle;
                 at.translate(x1, y1);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message