DrawingML 中的剪裁
我正在创建带有嵌入矢量图形的 Word DOCX 文件。显然,DrawingML 现在是插入矢量图形的首选方式。我无法弄清楚如何在绘图画布中剪辑图表。它似乎不断在组形状内缩放我的形状。
DrawingML 中是否可以进行裁剪?如果可以,是否有人有一小段代码或 XML 来为我指明正确的方向?
I am creating Word DOCX files with embedded vector graphics. Apparently DrawingML is now the preferred way of inserting vector graphics. I am having trouble working out how to clip a diagram within the drawing canvas. It seems to keep scaling my shapes within the group shape.
Is clipping possible in DrawingML, and if so, does anyone have a wee snippet of code or XML to point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DrawingML 中的裁剪来自
标记。如果它不是空的,则意味着它被裁剪了。此标签用于所有可视图形,例如图像、形状、图表等。以在 Word 中插入的 .EMF 为例:
和
请注意,它们是相同的,除了行
在第二个中。这意味着源矩形(即图像的尺寸)被剪切/剪裁/剪裁,左侧为 23.111%,右侧为 19.768%,底部为 32.841%。顶部尚未被裁剪。
Cropping in DrawingML is from the
<scrRect/>
tag. If it is anything but empty, it means it is cropped. This tag is used for all visual graphics, such as images, shapes, charts, etc.Take these two examples of an .EMF inserted in Word:
and
Note that they are the same, except for the line
<a:srcRect l="23111" r="19768" b="32841"/>
in the second one. What this means is that the source rectangle (i.e. the image's dimensions) is cut/clipped/cropped by 23.111% off the left, 19.768% off the right and 32.841% off the bottom. The top has not been cropped.