【发布时间】:2020-05-31 01:31:18
【问题描述】:
希望有人知道 SVG 文件。我正在浏览有关 SVG 图形的 Mozilla 教程,其中一个练习是查看以下代码:
<?xml version="1.0" standalone="no"?>
<svg width="200" height="280" xmlns="http://www/w3.org/2000/svg" version="1.1">
<polyline points="40 60 80 20 120 60" stroke="black" stroke-width="20"
stroke-linecap="butt" fill="none" stroke-linejoin="miter"/>
<polyline points="40 160 80 120 120 160" stroke="black" stroke-width="20"
stroke-linecap="round" fill="none" stroke-linejoin="round"/>
<polyline points="40 260 80 220 120 260" stroke="black" stroke-width="20"
stroke-linecap="square" fill="none" stroke-linejoin="bevel"/>
</svg>
它应该创建一个向上的三个角度的图形。 我有 8 个其他 SVG 文件可以毫无问题地转换为 Inkscape。但是上面代码中的图形不会转换为 Inkscape,Inkscape 给我这个错误:“加载请求的文件失败” 有什么我想念的吗?我尝试更改代码中的所有参数,认为图形可能太大但仍然无法正常工作。
【问题讨论】:
-
我刚刚创建了另一个 SVG 文件,它毫无问题地转换为 Inkscape:
<svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path d="M 10 75 Q 50 10 100 75 T 190 75" stroke="black" stroke-linecap="round" stroke-dasharray="5,10,5" fill="none"/> <path d="M 10 75 L 190 75" stroke="red" stroke-linecap="round" stroke-width="1" stroke-dasharray="5,5" fill="none"/> </svg> -
Inkscape 应该能够读取折线,但不能写入它们。您能否确认 Inkscape(哪个版本?)不读取折线?