具有强制抗锯齿功能的 EMF

发布于 2024-08-04 12:36:49 字数 310 浏览 5 评论 0原文

我们的程序需要生成矢量图形,为此我们选择了 EMF。然而,其他程序似乎使这些图像呈现非抗锯齿效果。我发现 SVG 格式确实有一个标志来指示某些/所有对象应该抗锯齿。

EMF 格式中是否有任何类型的标志或命令来表明我们想要抗锯齿?如果是这样,如何使用 System.Drawing 生成该命令.Imaging.Metafile 类?

谢谢。

Our program needs to generate vector graphics, and we chose EMF for that. However, it seems that other programs render these images non-antialiased. I found that SVG format does have a flag to indicate that some/all objects should be antialiased.

Is there any kind of flag or command inside the EMF format to indicate that we want to have antialiasing? If so, how to generate that command using System.Drawing.Imaging.Metafile class?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅冕 2024-08-11 12:36:49

EMF 文件是 GDI 命令的列表。因此,即使在 GDI+ 下,您在绘图之前调用 SmoothingMode(),它也不会消除锯齿。您必须枚举 GDI 命令,然后将其转换为 GDI+ 命令。

在 Vista/7 下,您可以使用名为 GdipConvertToEmfPlus/ConvertToEmfPlus 的 GDI+ 1.1 函数。
如果您希望您的程序在 XP 下运行,您应该编写自己的枚举,然后转换为 GDI+ 命令。我们已经在 Delphi 中完成了此操作,也许源代码可以帮助您。

EMF file is a list of GDI commands. So it won't be anti-aliaised, even if under GDI+, you put a SmoothingMode() call before the drawing. You'll have to enumerate the GDI commands, then translate it into GDI+ commands.

Under Vista/Seven, you can use GDI+ 1.1 function named GdipConvertToEmfPlus/ConvertToEmfPlus.
If you want your program to work with XP, you should write your own enumeration, then conversion to GDI+ commands. We've done this in Delphi, perhaps the source code may help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文