如何将 Illustrator 文件转换为 WPF 的路径
我们的图形人员使用 Adobe Illustrator,我们希望在 WPF 应用程序中使用她的图像作为路径。 有没有办法做到这一点?
Our graphics person uses Adobe Illustrator and we'd like to use her images inside our WPF application as paths. Is there a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以从 AI 转到 SVG 再到 XAML。
来自 Adobe Illustrator:文件 -> 另存为-> *.SVG。
SVG“Profile 1.1”似乎就足够了。
请注意,要在 XAML 中保留路径/组名称,您应该启用“保留 Illustrator 编辑功能”(或至少在 CS4 中如此称呼)。
SharpVectors 可以将 SVG 数据转换为 XAML 数据。 这将生成根
的 XAML 片段。执行复制粘贴所需的操作以及使用 XAML,例如将其放入如下所示的图像中。 AI 文件中的命名对象或组仍应在 XAML 中具有其名称,即通过
x:Name="..."
。You can go from AI to SVG to XAML.
From Adobe Illustrator: File -> Save As -> *.SVG.
SVG "Profile 1.1" seems to be sufficient.
Note that to preserve path/group names in XAML you should enable "Preserve Illustrator Editing Capabilities" (or at least as it's called in CS4).
SharpVectors can convert SVG data to XAML data. This will produce a fragment of XAML with root
<DrawingGroup>
.Do what you need to do to copy-paste and otherwise use the XAML, such as placing it into an Image like below. Named objects or groups in the AI file should still have their names in the XAML i.e. via
x:Name="..."
.让她将插图导出为其他格式(Illustrator 的最新版本支持 SVG),您可以使用或转换为可用的格式。
Get her to export the illustrations as some other format (recent versions of Illustrator support SVG) that you can use or convert to something that will work.
@ConcernedOfTunbridgeWells 建议的绕道现在开始有意义。 其他解决方案不再维护并且不再起作用。
因此,您可以使用此选项作为解决方法:
该解决方案甚至具有文本将保留文本并且不会转换为路径的优点。
如何转换多个文件?
Inkscape 还支持批量模式一次转换多个文件。 我使用了一个很棒的脚本(由 Johannes Deml 编写),用于在 Windows 上进行批量转换,该脚本采用矢量文件和使用 Inkscapes 批处理模式将它们转换为各种其他格式。 我也对其进行了修改以转换为 XAML。
您可以在 Github 上找到包含 XAML 的脚本。 原作者提供了一些有关如何使用该脚本的说明。
The detour suggested by @ConcernedOfTunbridgeWells is starting to make sense now. Other solutions are not being maintained and do not work anymore.
Hence, you can use this option as workaround:
This solution even has the advantage of text will stay text and is not converted to a path.
How to convert many files?
Inkscape also supports a batch mode to convert many files at once. I took a great script (by Johannes Deml) for batch conversions on Windows that takes vectors files and converts them to various other formats using Inkscapes batch mode. I adapted it to convert to XAML, too.
You can find the script that includes XAML on Github. Some instructions on how to use the script are provided by the original author.
我曾短暂使用过 Mike Swanson 的 Illustrator 插件,但现在我使用 SaviDraw。 从 AI 导出到 SVG。 在 SaviDraw 中打开。 导出到 XAML。
它仅适用于 Windows,在 Windows 应用商店免费。
也许最好的功能是它没有标准的钢笔工具,它有一个“路径”工具,可以根据您的鼠标运动或通过触摸在屏幕上绘制线条或形状。 它非常适合跟踪可以导入的位图(JPG 或 PNG)。
For a short time I used Mike Swanson's plug-in for Illustrator, but now I use SaviDraw. Export from AI to SVG. Open in SaviDraw. Export to XAML.
It's only for Windows, free on the Windows Store.
Probably the best feature is that it doesn't have a standard Pen tool, it has a "Path" tool that just draws lines or shapes following your motion with the mouse or on the screen with touch. It's great for tracing bitmaps, which can be imported (JPG or PNG).