gpt4 book ai didi

android - 来自 Inkscape 的图片不适用于 svg-android 库

转载 作者:太空狗 更新时间:2023-10-29 12:54:04 24 4
gpt4 key购买 nike

在android程序中使用Inkscape创建的svg文件似乎有问题。有时有效,有时无效(即使是像矩形这样的简单对象)。我使用了本教程:http://code.google.com/p/svg-android/wiki/Tutorial (来自 onCreate 的行)。我也用谷歌搜索,这个问题没有简单的答案。也许你对它了解更多?我应该使用其他编辑器或库吗?库使用此文件:http://code.google.com/p/svg-android/downloads/detail?name=android.svg (来自图特)。类似问题: Exists a svg library that works fine for android?

顺便说一句:我想在我的游戏中使用 svg 图形。执行此操作的最佳方法是什么?

最佳答案

svg-android 教程状态

This library supports a subset of the SVG Basic 1.1 specification. Typically, you can just load your vector artwork in Illustrator and then save it as a SVG file (selecting the SVG Basic 1.1 option when asked) and it will work fine. Inkscape does not have direct support for SVG Basic, but many drawings will just work when saved as SVG from Inkscape.

我猜 inkscape 是你的问题。尽管它说来自 inkscape 的许多文件都可以工作,但您的 inkscape 似乎有什么东西导致它损坏。

如果我是你,我会尝试的第一件事是从 illustrator 而不是 inkscape 中保存它们(我认为你可以在 illustrator 上免费使用 30 天)。

支持 svg 可能会更容易支持不同的分辨率。但如果这太麻烦,那么可能值得以几种不同的分辨率保存图形的 png 副本,并在 ldpi、mdpi、hdpi 文件夹中使用它们。

关于android - 来自 Inkscape 的图片不适用于 svg-android 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8793496/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com