如何从给定的xml数据计算MS Office Powerpoint形状的旋转值 [英] how to calculate the rotation value for the MS Office Powerpoint Shapes from the xml data given
问题描述
我想从给定的OOXML数据中获得适当的旋转值以绘制MS Office Powerpoint 2007文件的形状,如下所示:
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>
旋转值指定为"xfrm rot = 5400000".考虑到这一点,必须计算其适当的值,因此必须处理形状的高度和宽度以绘制形状.
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.
推荐答案
将其除以60000得到旋转角度.在这种情况下,5400000/60000 = 90度.它是就地旋转,这意味着它在中心X和中心Y上旋转.
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.
这篇关于如何从给定的xml数据计算MS Office Powerpoint形状的旋转值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!