[dojo-contributors] Re: Draft: Unified 2D graphics subsystem for Dojo

Tom Trenka ttrenka at gmail.com
Wed Jun 7 10:00:54 EDT 2006

> > I'm thinking  (and hoping) that parts of this translation will be
> > Dojo-specific, in that attach points will be preserved.  If I do it right
> > (started working on it), the translation would happen *before* the Dojo
> > parser has at it--and we might even consider letting it be a separate
> > build
> > kind of thing, so that you could have VML spit out at design time for
> > manipulation.  Certainly that would be a hell of a lot more efficient.
> So the file served up would be pre-translated into the target vector format?
> <v:rect dojo-hint-foo="hint" dojo-hint-bar="baz"/>
> and
> <svg:rect dojo-hint-foo="hint" dojo-hint-bar="baz"/>
> This would be fine for widget templates, though it makes them a bit more
> difficult to author. Wouldn't help too much for user-edited drawings
> unless there's back-end transformation.

No, not at all.  In the current Dojo template system, you have the
custom attributes dojoAttachPoint et al.  What I'm saying is that I
would preserve that so that when the widget parser runs, it passes
references and attaches events to the correct node--even if that node
isn't the same as the original.  For example:

&lt;svg:rect dojoAttachPoint="rectangleNode"/&gt; would map to
&lt;v:rect dojoAttachPoint="rectangleNode"&gt;

etc.  That way the widget in question would continue to have a handle
on the node that represents something manipulatable.

(Note that when I'm referring to SVG to VML, I'm talking primarily in
the context of the widget system).

> I've seen some attempts at this on the net, though the one I tried failed
> pretty badly. Here's an academic paper which might also help:
> http://www.cs.sjsu.edu/faculty/pollett/masters/Semesters/Fall03/JulieNabong/cs298presentation.pdf

Already have the paper and have digested a number of things from it,
thanks.  The main thing I'm looking at is the need to include script
in the transformation process; I don't think I can load it on the fly
though, which means there's probably be some duplication of JS stuff
:(   I may see if I can figure out a way of loading that code, but
we'll see.

> I was expecting we'd use the dojo animation system for v1; I'd rather not
> bother with declarative animation until it's "free" in at least one
> browser. Though I suppose it's in the IE deprecated obscure have to read a
> typelib for documentation DirectAnimation system someplace.
> > Text manipulation...that's another story.  My instinct is to say we use
> > mixed documents for that always (i.e. embed an HTML element inside an SVG
> > one for text handling, etc)...I'll have better info soon enough as to
> > what's
> > possible in terms of transformations in VML.
> The v:textpath element looks like it can be transformed arbitrarily as
> well as locking text to a path word-art style. I think for dojo 0.4-0.5 we
> can just support rotations and some interoperability with HTML.


More information about the dojo-contributors mailing list