本文介绍了将矢量图像(例如,emf)文件转换为图形路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
问题的简短版本:
有什么方法可以从EMF(或类似文件)文件创建GraphicsPath?


问题的长版:

我有一种方法,可以在绘制图像之前安排图像的位置,以使它们不重叠.目前,为每个图像分配一个RectangleF,该矩形与图像的大小和当前位置相匹配.如果两个矩形重叠,则移动其中一个(例如向上),以使它们不重叠.安排完成后,图像将绘制到画布"上.
(这些经过整理的图像将作为EMF文件保存到硬盘中.)
我需要从使用矩形更改为使用GraphicsPaths,以便这种自动排列更加紧凑".我无法弄清楚如何从EMF文件或图元文件生成图形路径...
有什么办法可以从EMF文件创建图形路径?

谢谢!
Lee

Hi there,
Short version of the question:
Is there any way to create a GraphicsPath from an EMF (or similar) file?


Long version of the question:

I have a method which arranges the position of images, before they are drawn, such that they do not overlap. At present, each image is assigned a RectangleF which matches the size and current location of the image. If two rectangles overlap, one of them is moved (eg up), so that they do not overlap. Once arranging has taken place, the images are drawn onto the ''canvas''.
(These images which get arranged are saved to the hard disc as EMF files.)
I need to change from using rectangles to using GraphicsPaths, so that this auto arranging is much ''tighter''. I can''t figure out how to generate a graphics path from an EMF file or metafile though...
is there any way to create a graphics path from an EMF file?

Thanks!
Lee

推荐答案



这篇关于将矢量图像(例如,emf)文件转换为图形路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 10:35