Jump to content

Scalabnle Vector Graphics


roundcorners

Recommended Posts

Hi all, I have done a little searching and perused the w3c schools SVG tutorial and I can't believe how brilliant SVG proposes to be. What a wonderful invention, to be able to define a purely xml graphic in text. So my topic starter is;Is anyone here already using SVG's in a commercial environment, does anyone use this ostensibly new technique in front end wed development?Can SVG's replace many of the graphics that developers already use? I imagine it would be a pretty horrendous task to replace images that use photography, but icons and such could be brilliantly rebuilt. Also, as this is an xml based technology, does it require xslt to transform it to html before styling? I thinking in terms of layering images, pertaining to css2 simply because css3 is not yet widely supported.Anyway, any disucssion on the topic, ideas, suggestions or pointers, esp. expamples would be greatly appreciated.cheers

Link to comment
Share on other sites

Is anyone here already using SVG's in a commercial environment, does anyone use this ostensibly new technique in front end wed development?
SVG isn't well-supported enough yet. There are many rendering differences between browsers and some just don't understand it all together.
Can SVG's replace many of the graphics that developers already use?
Not yet - see above. Also, it is inappropriate to replace photos with SVGs as photos are raster graphics, not vectors.
Also, as this is an xml based technology, does it require xslt to transform it to html before styling?
Err, you would embed an SVG document in a HTML page the same way as you would a raster graphic, i.e. through the use of the <img /> tag; or you can use data islands (XHTML only, not widely supported).
Link to comment
Share on other sites

SVG isn't well-supported enough yet. There are many rendering differences between browsers and some just don't understand it all together.
That "some" would be IE btw, translating to ~66.5% of the internet users. If IE was to support SVG, I'm sure many sites will start using it, as support in other browers is "decent" on the very least. In the case of Opera, it's nearly excellent.
I imagine it would be a pretty horrendous task to replace images that use photography.
Graphics that are raster by definition should not be translated to any kind of vector graphics. Photos are that kind of graphics.The reason is that the more details you have on a picture, the larger the vector graphic becomes. Most icons (e.g. emoticons) don't have many details, and for them, vector graphics are a feasable alternative, and one that may even result in some size savings, though for some cases (e.g. emoticons) where the icon is really small, the raster image may be smaller than the vector graphic - such cases would have to be judged on a case by case basis.
Also, as this is an xml based technology, does it require xslt to transform it to html before styling?
The whole idea of having an XML based technology that is standardized is to eliminate the need to translate it. It would instead be supported "natively" or (as is the case today with IE) with plug-ins. The fact that it is based on XML however indeed means that you could use XSLT to transform it to something else, or take another kind of XML and turn it to SVG... That is actually where the beauty of XML lies - taking one language and use it for several purposes. For example, if you have an XHTML table describing browser market share, you could take that same table, and generate an SVG pie chart from it. Changing the table would immediatly result in a change in the graphic. You can do that today on the server side (by generating a raster image that is), but there's no way to do it on the client side... not without SVG support that is.
Link to comment
Share on other sites

That is actually where the beauty of XML lies - taking one language and use it for several purposes. For example, if you have an XHTML table describing browser market share, you could take that same table, and generate an SVG pie chart from it. Changing the table would immediatly result in a change in the graphic.
XML's answer to GD functionality :)
Link to comment
Share on other sites

I use scripted svg on my site, a little game in SVG: ViewIts way better than flash (as long as I don't care users browsers support it or not. ) currently I'm experimenting with php, to see if it can generate some useful svg.wish we can just write it svg in html <svg>.....</svg>

Link to comment
Share on other sites

wish we can just write it svg in html <svg>.....</svg>
Theoretically you can, using a feature of XML called data islands. However, this is supported even less than SVG so you'll have to wait awhile (e.g. for XHTML 2 to come out).
Link to comment
Share on other sites

Theoretically you can, using a feature of XML called data islands. However, this is supported even less than SVG so you'll have to wait awhile (e.g. for XHTML 2 to come out).
Errr... I think you're confusing XML data islands (a proprietary IE feature which is now rightfully listed in the "don't" page) with XML namespaces (a mechanism for embedding two or more dialects in the same document without causing naming conflicts).Even today, with XHTML, you can do that, as long as you specify the namespace. However, this means that further to requiring the browser to support SVG, you'd require it to support XHTML, and actually support SVG in XHTML.Note that using the normal XHTML DTD is not going to work... that is, your resulting XHTML+SVG document will be invalid. To keep it valid, you must use and follow the conventions in the XHTML+MathML+SVG DTD.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...