--- In [email protected], "Charles McCathieNevile" <cha...@...>
wrote:
>
> On Tue, 21 Dec 2010 22:50:48 +0100, cremnosedum <rich...@...>
> wrote:
>
> > I've been reading up on Canvas. It seems a huge hassel compared to
> > SVG. You have to define this area (or multiple areas) on your page and
> > then draw in them with JavaScript. Several JS functions are equivalent
> > to one SVG element. Has somebody made a JS library that will handle the
> > common functions so you can do them with one function call (e.g.
> > line(x1,y1,x2,y2,strokewidth,strokecolor))? Presumably you could have
> > something that reads an SVG file and renders it in Canvas but would it
> > be worth it?
>
> I am pretty sure that someone has done that, although I can't think where
> to start looking. Probably in this group ;)
The svg best kept secret [1] does that :) The DOM helper [2] can be used
without the framework overhead.
A referenced call looks like this:
var myElement = createSVGElement ({
element : "element name", // required
anyAttributeName : value,
"any-attributeName" : value,
textNode : string, // opt.
appendTo : node ref. // opt.
})
The file contains examples as well as a createHTMLElement variant for use with
<foreignObject>.
[1] http://www.dotuscomus.com/pergola/
[2] http://www.dotuscomus.com/svg/lib/library.html#tinytools
Regards,
Domenico Strazzullo
>
> For people who are more used to JS than markup, canvas can make sense. And
> if you want really high-performance, the fact that it doesn't make a DOM
> has some speed advantages.
>
> > Is Canvas that much more widely supported than SVG? I'm probably
> > asking the wrong group about this.
>
> It's a bit better supported - in that SVG features like animation are
> still missing or patchy in some browsers.
>
> cheers
>
> > Richard Pearman http://www.pixelpalaces.com/
> > The next stage in the evolution of web comics:
> > http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
> > Read my Helium articles: http://www.helium.com/users/212199
> > South Alberta Cactus and succulent society:
> > http://www.facebook.com/group.php?gid=20360241008
> >
> > --- In [email protected], "Dailey, David P."
> > <david.dailey@> wrote:
> >>
> >> Citing the marvels of <canvas> and new CSS features, Adobe has disabled
> >> the SVG support in AIR. The statement is a bit odd:
> >>
> >> "a great deal of interest lately is support for SVG"
> >> Later
> >> "coupled with a trend toward reduced interest in SVG graphics"
> >> and finally:
> >> "renewed interest in rich JavaScript applications powered by HTML5
> >> canvas and faster JavaScript engines increased the number of requests
> >> for scriptable vector graphics via SVG."
> >>
> >> http://www.adobe.com/devnet/air/ajax/articles/air_and_webkit.html
> >>
> >> Oneiromancy is apparently not their specialty any more. They could
> >> stand a tea-leaf reading lesson from the after-hours discussions at SVG
> >> Open I think.
> >>
> >> David
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >
> >
>
>
> --
> Charles McCathieNevile Opera Software, Standards Group
> je parle français -- hablo español -- jeg lærer norsk
> http://my.opera.com/chaals Try Opera: http://www.opera.com
>
------------------------------------
-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/