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

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

问题描述

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

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桌面中不呈现任何内容(或仅呈现文本元素):

推荐答案

您粘贴的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 Desktop中的SVG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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