Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to calculate the rotation value for the MS Office Powerpoint Shapes from the xml data given

Tags:

openxml

I want to get the proper rotation value to draw the shape of the MS office Powerpoint 2007 file from the given OOXML data as below :

<p:sp>
            <p:nvSpPr>
                <p:cNvPr id="3" name="Rectangle 66" />
                <p:cNvSpPr>
                    <a:spLocks noChangeArrowheads="1" />
                </p:cNvSpPr>
                <p:nvPr />
            </p:nvSpPr>
            <p:spPr bwMode="auto">
                ***<a:xfrm rot="5400000">***
                    <a:off x="2443049" y="-1042472" />
                    <a:ext cx="304800" cy="4419600" />
                </a:xfrm>
                <a:prstGeom prst="rect">
                    <a:avLst />
                </a:prstGeom>
                <a:ln>
                    <a:headEnd />
                    <a:tailEnd />
                </a:ln>
            </p:spPr>

The value of rotation is given as "xfrm rot = 5400000". Considering this, its proper value has to be calculated and accordingly the height and width of the shape has to handled to draw the shape.

like image 624
AAK Avatar asked Oct 23 '22 12:10

AAK


1 Answers

Divide it by 60000 to get the rotation angle. In this case, 5400000/60000=90 degrees. It is an in-place rotation, meaning it rotates on Center X and Center Y.

like image 77
Todd Main Avatar answered Oct 31 '22 13:10

Todd Main