计算PPTX XML中旋转的分组元素的最终位置 [英] Calculating final positions of rotated grouped elements in a PPTX XML

查看:57
本文介绍了计算PPTX XML中旋转的分组元素的最终位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要确定PPTX文件中图像的位置。我们想出了大部分的事情(a:off,a:chOff,a:chOff和a:chExt很清楚)。如果我们有一个包含各种分组的文档,这很好用,我们可以确定每个包含的"pic"的确切
位置。对象。

We need to determine the position of images in PPTX files. We figured most of the things out (a:off, a:chOff, a:chOff and a:chExt are clear). If we have a document with all kinds of grouping in there, this works out nicely, and we can determine the exact position of each contained "pic" object.

但是,当涉及到旋转时,我们会遇到麻烦(不是围绕中心旋转点的数学运算,经过检查和双重检查)。如果只旋转一个pic节点,则很容易,我们最终得到正确的位置和角度。但是,当我们开始轮换组时
,我们很难确定正确的位置。

However, we get into trouble when there is rotation involved (not the math to rotate a point around a center, that is checked and double checked). If only a single pic-node is rotated, it is easy, and we end up with the correct position and angle. However, when we start rotating groups, we have trouble to determine the correct positions.

是否有某个技术指南,或者一个很好的例子,描述了我们的顺序需要计算点,我们需要考虑哪一点?我们需要从顶部到底部(group1 - >  group2 - > pic)或底部到
top(pic - > group2 - > group1)?我们是否展平了所有内容,旋转如何与取消分组/展平一起工作?

Is there a technical guide somewhere, or a good example, describing the order in which we need to calculate the points, and which point we need to consider? Do we need to work from the top to the bottom (group1 ->  group2 -> pic) or bottom to top (pic -> group2 -> group1)? Do we flatten everything, how does the rotation work with the ungrouping/flattening?

我的例子很简单:幻灯片中包含相同图像的4倍(简单来说,每个图像尺寸为200x100,排列方形为400x200,左上角,右上角,左下角和右下角。旋转"右下"和"右下"。图像45度,使用左下角图像分组
。将两个顶部图像分组,最后将两个组分组在一起。然后,将最后一组也旋转45度(这使旋转的图像旋转90度,其他三个旋转45度)。

My example is simple: a slide with 4 times the same image in it (to make it simple, each image 200x100 in size, lined up in a square of 400x200, top left, top right, bottom left and bottom right). Rotate the "bottom-right" image 45 degrees, group it with the bottom-left image. Group the two top images as well, and finally group both groups together. Then, rotate the final group also 45 degrees (which makes the rotated image 90 degrees rotated, and the other three 45 degrees).

我找不到正确的顺序,以我的方式工作通过XML树以及我需要应用旋转的顺序。这里的任何帮助将不胜感激(一个很好的解释,链接到文档甚至一段(伪)代码)。 

I cannot find the correct order in which to work my way through the XML tree and in which order I need to apply the rotation. Any help here would be appreciated (a good explanation, links to docs or even a piece of (pseudo)-code). 

推荐答案

嗨伯纳德,

感谢您的提问。 工程师会尽快与您联系。

Thank you for your question.  An engineer will contact you soon.


这篇关于计算PPTX XML中旋转的分组元素的最终位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆