绘制电动势抗锯齿 [英] Draw emf antialiased

查看:325
本文介绍了绘制电动势抗锯齿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来绘制一个EMF图元文件(出口形式的绘图工具)开启AA?我想这些工具不能够导出antaliased EMF文件,所以我想知道如果我能在我的控制中的OnPaint覆盖绘制电动势时,重新打开它手动。

Is there a way to draw an emf metafile (exported form a drawing tool) with antialiasing enabled? The tools I tried are not capable of exporting emf files antaliased so I wondered if I can turn it back on manually when drawing the emf in the OnPaint override of my Controls.

如果任何人都可以证实,在技术上是可能产生抗锯齿EMF文件,另一种解决方案是使用绘图工具,可以导出到抗锯齿EMF或有第三方转换器做到这一点。如果有人knowns这样的工具,请让我知道。

If anyone can confirm that is technically possible to generate antialiased emf files, another solution would be to use a drawing tool that can export to antialiased emf or have a 3rd party converter do this later. If anyone knowns such a tool, please let me know.

编辑:当在看 EMF说明它似乎该电动势本身实际上可以存储的信息是否是要呈现抗锯齿与否。至少我无法找到任何东西。它更可能是抗混叠是由回放引擎完成。例如,当我打开Word 2007中的EMF它呈现抗锯齿。但不是当我画它与GDI +播放引擎( Graphics.DrawImage(...))。或者当我认为它的标准Windows图像浏览器。 这使我相信,一些工具确实有自己的EMF播放引擎。因此,也许有免费的.NET库(preferably与源$ C ​​$ c)该给我存储在经过解析的EMF文件的EMF指令的对象模型,这样我就可以打回用自己而不是 Graphics.DrawImage(...)

When looking at the emf instructions it doesn't seem that emf itself can actually store the information whether it is to be rendered antialiased or not. At least I couldn't find anything. It is more likely that the antialiasing is done by the playback engine. For example when I open an emf in Word 2007 it is rendered antialiased. But not when I draw it with GDI+ "playback engine" (Graphics.DrawImage(...)). or when I view it the standard windows image viewer. This makes me believe that some tools actually have their own emf playback engine. So maybe there is free .NET library (preferably with source code) that give me an object model of the emf instructions stored in the parsed emf file so I can play it back myself instead of using Graphics.DrawImage(...)?

推荐答案

我们在DirectX的项目也有类似的问题。升频和降频工作到一定程度,但它是伪造的。如果它的东西,你需要做一遍又一遍,你也许可以分析的WMF的记录,并与GDI绘制它们+抗锯齿。

We had a similar issue in a DirectX project. Upscaling and downscaling works to a certain degree, but it's faking it. If it's something you need to do over and over, you could perhaps parse the records of the WMF and draw them with GDI+ antialiased.

下面的线程支持这一行动(但他们是从2005年这样的事情可能会改变):

The following threads back this up (but they're from 2005 so things might have changed):

http://www.dotnet247.com/247reference/msgs/28/ 144605.aspx

<一个href="http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-sdk/1127/Graphics-DrawImage-metafile-no-antialiasing" rel="nofollow">http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-sdk/1127/Graphics-DrawImage-metafile-no-antialiasing

这三个项目的也许的做的工作给你:我假设你确定与手工做的:

These three programs might do the job for you: I'm assuming you're ok with doing it by hand:

的http:// emf-以矢量变频器,命令行的ser.smart code.com / info.html里

http://www.verypdf.com/pdf-editor/index.html

http://www.ivanview.com/converter/emf-batch- converter.html

好了,这里有一个程序,让你检查以各种方式的EMF:

Well, here's a program that will let you inspect an EMF in various ways:

HTTP://download.cnet。 COM /窗/ 3055-2383_4-10558240.html?标记= PDL-再导向

...这是一个免费的图书馆,让您解析EMF命令,并将其输出的GDI + 122。这应该是不可或缺的:

...and here's a freeware library that will let you parse 122 of the EMF commands and output them in GDI+. That should probably do the trick:

HTTP://www.$c$ cproject.com/KB/GDI-plus/emfexplorer.aspx?msg=2359423

...哦,并且通知还发表评论#3的$ C $的CProject页面上。貌似有人以前拍着他们的头靠在墙上。希望这能解决你的问题。

...oh, and notice also comment #3 on the codeproject page. Looks like someone have banged their heads against the wall before. Hope this solves your problem.

这篇关于绘制电动势抗锯齿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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