Opened 11 years ago
Closed 5 years ago
#11006 closed enhancement (patchwelcome)
SVG Text -> GFX surface conversion API
Reported by: | liyang | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | DojoX GFX | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
In dojox.gfx.utils there is a toSvg() API that concerts a GFX surface (whether it is VML based, or SVG, or even canvas), to SVG by creative use of the SVG render code. It would be really cool if there was an inverse API take SVG Text and convert it back to a GFX surface. Preferably without using XSLT.
The benefit of this would be:
1.) Pulling in a document into dijit.Editor that has inline SVG and being able to bind GFX to the inline SVG and manipulate it.
2.) Being able to load an SVG scene from a file (via xhr), and construct a GFX object from it that can be manipulated.
Change History (6)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → future |
Status: | new → assigned |
Summary: | SVG Text -> GFX srfuace conversion API → SVG Text -> GFX surface conversion API |
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 11 years ago by
A notice for implementation, there's xsl asset that converts svg to gfx already, namely:
- dojox/gfx/resource/svg2gfx.xsl
- dojox/gfx/resource/svg2gfx-simple.xsl
comment:4 follow-up: 5 Changed 11 years ago by
Because you can't apply xslt in the browser consistently (to my knowledge).
comment:5 Changed 11 years ago by
Replying to jaredj:
Because you can't apply xslt in the browser consistently (to my knowledge).
For my work I needed XSLT and wrote simple shims to support. Everybody is doing it one way and IE does it in its own way. But other than that it works fine. The only potential problem can be mobile browsers --- I never tested them for XSLT, they may skip on implementing it.
In any case I can contribute shims.
comment:6 Changed 5 years ago by
Milestone: | future → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | assigned → closed |
Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.
Two things:
xxx_attach.js
(e.g.,svg_attach.js
,vml_attach.js
, and so on). They idea was to be able to instantiate a native DOM, and attach gfx object to existing elements. Clearly it is not a portable thing, yet it allows to introspect existing DOM.