]> source.dussan.org Git - poi.git/commitdiff
support rotation of simple shapes
authorYegor Kozlov <yegor@apache.org>
Thu, 26 Mar 2009 10:13:50 +0000 (10:13 +0000)
committerYegor Kozlov <yegor@apache.org>
Thu, 26 Mar 2009 10:13:50 +0000 (10:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@758578 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java

index b0bdcadcca7d2c8bf6c595bdb9f40d076ac78400..cb32e69c2bba5d4ac16413977b0f117f0ed95426 100644 (file)
@@ -246,6 +246,15 @@ public class SimpleShape extends Shape {
         return angle;
     }
 
+    /**
+     * Rotate this shape
+     *
+     * @param theta the rotation angle in degrees
+     */
+    public void setRotation(int theta){
+        setEscherProperty(EscherProperties.TRANSFORM__ROTATION, (theta << 16));
+    }
+
     public Rectangle2D getLogicalAnchor2D(){
         Rectangle2D anchor = getAnchor2D();