poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r758578 - /poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java
Date Thu, 26 Mar 2009 10:13:59 GMT
Author: yegor
Date: Thu Mar 26 10:13:50 2009
New Revision: 758578

URL: http://svn.apache.org/viewvc?rev=758578&view=rev
Log:
support rotation of simple shapes

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java?rev=758578&r1=758577&r2=758578&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java Thu Mar 26 10:13:50
2009
@@ -246,6 +246,15 @@
         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();
 



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


Mime
View raw message