SVG in Titanium Desktop?
Asked Answered
H

2

5

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.

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

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

Thanks.

Edit:

Example SVG code:

<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>

Renders triangle in Chrome and other browsers:

enter image description here

Renders nothing (or only text elements) in Titanium Desktop:

enter image description here

Hedden answered 27/10, 2011 at 14:34 Comment(4)
Can you please provide an example?Emileemilee
@TimothyAllynDrake: I added an SVG example that doesn't work in the Titanium environment. Thanks.Hedden
@TimothyAllynDrake: When drawing SVG using JavaScript, i.e. createElementNS(...) the SVG shows fine! But not when the markup is already on the page ...Hedden
I'll try and help you figure this out tonight.Emileemilee
H
1

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/Graphics/SVG/Test/20061213/htmlObjectHarness/full-index.html

Hollister answered 12/11, 2011 at 14:37 Comment(1)
That link is a bit dated. The latest published testsuite is available here: dev.w3.org/SVG/profiles/1.1F2/test/harness.Sorghum
S
0

The WebKit/WebCore framework in Titanium Desktop is quite outdated.

Titanium Desktop has been abandoned by appcelrator and converted to a community driven project.

The community is discussing a switch to ChromeEmbedFramework.

Scandura answered 31/3, 2012 at 6:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.