From f1826a69116f8dcca8942512a4eef9c72e5b183b Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Thu, 26 Mar 2009 10:13:50 +0000 Subject: [PATCH] support rotation of simple shapes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@758578 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hslf/model/SimpleShape.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java b/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java index b0bdcadcca..cb32e69c2b 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/SimpleShape.java @@ -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(); -- 2.39.5