World: r3wp
[SVG Renderer] SVG rendering in Draw AGG
older newer | first last |
shadwolf 2-Jul-2005 [72x8] | hum xpdf.svg file shows me a problem with the use of xml-to-object ... if you have serveral g block at the same level all g block are compacted into the same reference |
so in Rebol tree object the g block can be a bloc of sub object or an object ;) | |
*********** | |
Okay so here is the first version of my work on SVG to rebol objects tree structure | |
http://shadwolf.free.fr/svg-demo-shad04.r | |
try to load all the files that Ashley provides with his svg-demo | |
this script support recursive G block (objects /list) and path (object list) | |
what is not supported are radial / linear Gradient (content and border), transformations (local/global I'm still pending for informations on it) and all other shapes than path (like rect for example) | |
Ashley 2-Jul-2005 [80x2] | Good progress! If you change: "stroke-width" [line-width: to decimal! val] to "stroke-width" [line-width: to-unit val] then it'll run all your sample SVG icon files as well. Wish I knew the answers to your AGG questions, but like you I'm waiting on more documentation / examples. |
I've spent quite a bit of time looking at Inkscape (http://www.inkscape.org/) and it seems to be the only / best SVG game in town (their command-line driven SVG to PNG conversion seems to be particularly well regarded). Looking forward to their 0.42 release as it supports OS/X as well. The Clip Art site that they link to (http://www.openclipart.org/) is also a treasure trove of Public Domain files (which solves the GPL concerns I had with many of the dedicated KDE / Gnome icon sets). I'm also looking forward to their release 15 which seems to be just around the corner. Lots of good news in the SVG world, I wonder how long before mainstream browsers start supporting it? (without plugins). | |
shadwolf 2-Jul-2005 [82x7] | Inkscape is the successor project of sodipodi (for example you can see reference to sodipodi into teh SVG output files ...) Sodipodi was abandonned by the dev team so some of them retakes it and continue the adventure with inkscape |
All this to say that it doesn't fall from the sky ;) | |
I like particularly the capability of generating light weight SVG files (plein text) the drawing tools are simple powerfull very well thinked and pretty good | |
I psent lot of time using it (more than 80 hours since this last weeks ) all SVG files that I could found exists | |
I like the XML primitive draw explorer like a tree view of the compoun of your draw this is particularly good to write SVG renderer | |
Handling SVG as REBOL object! tree makes it really really easier to set recursivity and code writing ( as all can be exploded into small fonctions I hope the resulting code once terminated won't be so deficult to read | |
but you know now my way to work I prefer easy and powerfull /flexible code than hudge monolitic code ;) | |
Ashley 2-Jul-2005 [89] | No argument here. ;) |
shadwolf 2-Jul-2005 [90x4] | http://shadwolf.free.fr/svg-demo-shad04.r |
now supports rect tag ;) | |
oups I make it only for groups ;) | |
hahaha ;) | |
Graham 2-Jul-2005 [94] | Firefox is supposed to be able to support SVG ( a subset at least ) without plugins, but I couldn't get it to work. I had to download Adobe's plugin. |
shadwolf 2-Jul-2005 [95x3] | so we can see in my code 2 approch for retrieving information one for top level second for g tags (groups can be recursiv) |
GRaham same for me adobe plugin works well with IE but not with firefox | |
maybe they saw a boggus open door in this plugin and disable it's support (this can be the case for a 1.0.4) | |
Graham 2-Jul-2005 [98] | I got the Adobe plugin to work with firefox eventually. |
shadwolf 2-Jul-2005 [99x8] | so you have to remaining choice (3 in fact ) 1) using IE but then your not my pal any more, 2) installing Inkscape and relate it to svg file 3) help me finishing the SVG viewer using REBOL !!! ;)) |
but what I need are high level information and formation on draw agg and this I know very little people that can respond in this point :) | |
this could be a good promotion point to insert SVG rendering into the rebplug for firefox once it's completed and optimised ;) | |
my actual code is about 587 lines of code and it's not ended | |
still lot of work on it gradients and transform handling can be very code consummer | |
I need to handle others drawing primitivs too | |
corrected ;) | |
I improve some more the rendering now the file gnome-keyboard-dev.svg is fully and perfectly rendererd. I put a red pen-fill color for identify all primitives that needs fill:url related gradient | |
shadwolf 4-Jul-2005 [107x5] | ************ |
I have improved the svg rendering engine | |
here is the new version | |
http://shadwolf.free.fr/svg-demo-shad05.r | |
Chanlog: * Cleaner Code (near 200 lines saved) * support new draw primitives Ellipse, Path Arc, rect * recursiv G block parsing have been improved Still not supported * transformation information (matrix,scale, rotate, skew) * gradient information (linear, radiant etc...) * circle, text, line, polyline, polygones | |
Ashley 11-Jul-2005 [112] | Release 15 of the OpenClipart library is out: http://www.openclipart.org/downloads/index.php ... over 4,000 high-quality *public domain* SVG images! |
shadwolf 11-Jul-2005 [113x2] | I'm hard working on the matrix support .. |
and I'm close to have found a solution to one of my problems regarding to the transformation matrix | |
shadwolf 22-Jul-2005 [115] | Features still on the work table are: - SVG Transformation translation (mostly matrix) - SVG Gradient translation (linear partern radiant) - SVG drawing primitives (some drawing primitives are not supported actually ) - SVG Animation translation (don't know if this is a usefull and suitable fonctionnality tellme what do you think about it) |
Robert 5-Aug-2005 [116] | FYI: Ed Pegg writes "I did a survey of all available vector-based drawing programs, in anticipation of SVG in the next Firefox. I found 29 different vector drawing programs. Of these, 14 were free or open source. More than I expected. Did I miss any good ones?" http://developers.slashdot.org/article.pl?sid=05/08/02/0117224&from=rss |
shadwolf 5-Aug-2005 [117x2] | Good list ;) |
personnaly I'm working with InkScape a very good SVG software... | |
shadwolf 1-Jan-2006 [119x3] | For ppl interrested in SVG rendering engine. My tonight work and test on the engine is resumed in the AGG topic. To resume before matrix bug as causing bad scale and bad position. Now we have good position but still bad scale i post screen cap samples and we can see that the evolution is good betwin View 1.3.1 and 1.3.2 |
transform problem are on their way to be solve gradient too by cyphre and Carl those two things are the most blockant problems until they are not completly solved we can't expect to have a full working SVG rendering engine -> most of SVG imagines use transform effects and gradients this means that if we want to get a pretty good and reliable SVG engine we have to fixe those two issue. SVR rendering engine is a good and hudge test upon AGG integration to REBOL/View and it allows us to embetter it !!! Once we get a fully working engine with basic human understandable algorithm i will start the optimisation process using parse (but to be franck i don't know how parse will react in front svg row data or how will be the time to dev this parse based SVG engine ... in all cases I think the actual engine have teached me a lot arrounf the SVG to AGG adaptation process so i hope the translation to parse and parse/rules will not be too hard and too long) | |
well last thing i can say is that SVG rendering engine is very high on my task list ( task number one) i worked on the adding of some other new drawing primitive (image rect, circles). I will continue to work on the close support of all SVG datas that can have a meaning in AGG context. SVG rendering engine is a 2 weeks of work only!!! ... until i fall on the gradient and transforms problems so this ensure us advancing on this project will be very fast once we solve bugs in REBOL/View related to AGG (wich is in progress actually) | |
older newer | first last |