Titanium 桌面中的 SVG? [英] SVG in Titanium Desktop?

查看:21
本文介绍了Titanium 桌面中的 SVG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 Titanium Desktop 的 1.1.0 SDK,并且只有我的 SVG 文本元素可以正确呈现.SVG 方法如 getBBox() 会给出错误消息.

I'm running the 1.1.0 SDK of Titanium Desktop and only my SVG text elements are rendered properly. SVG methods such as getBBox() give error messages.

该应用程序在 Titanium 环境之外运行良好 - 即:Chrome、Firefox、Safari.

The application works well outside the Titanium environment - that is: Chrome, Firefox, Safari.

关于如何解决这个问题的任何想法?(Titanium 中真正运行的是哪个浏览器 + 版本??)

Any ideas on how to solve this? (What browser + version is really running inside Titanium??)

谢谢.

SVG 代码示例:

<svg width="400" height="400" viewBox="0 0 400 400"
     xmlns="http://www.w3.org/2000/svg" version="1.1">
  <title>Example triangle01- simple example of a 'path'</title>
  <desc>A path that draws a triangle</desc>
  <rect x="1" y="1" width="398" height="398"
        fill="none" stroke="blue" />
  <path d="M 100 100 L 300 100 L 200 300 z"
        fill="red" stroke="blue" stroke-width="3" />
</svg>

在 Chrome 和其他浏览器中呈现三角形:

在 Titanium Desktop 中不渲染任何内容(或仅渲染文本元素):

推荐答案

您粘贴的 SVG 非常基础,应该可以在所有支持 SVG 的环境中正常工作.以下是 W3C 综合测试套件的链接,用于测试 SVG 标准的一致性.请找到一种在您的环境中运行这些测试的方法.如果测试失败,那么您的环境可能不支持完整的 SVG 规范.

The SVG that you have pasted, is pretty basic and should work well in all SVG supported environments. Below is the link to the W3C's comprehensive test suite to test comformance to the SVG standard. Please find a way to run these tests in your environment. If the tests fail then your environment may not support the full SVG specs.

http://www.w3.org/图形/SVG/Test/20061213/htmlObjectHarness/full-index.html

这篇关于Titanium 桌面中的 SVG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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