r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[SVG Renderer] SVG rendering in Draw AGG

shadwolf
2-Jul-2005
[100x7]
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
[119x5]
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)
I still take as SVG workshop / reference software INKSCAPE  pretty 
good LGPL  sofware available for  all OS.
In the futur i hope we will use a lot svg in dynamic  drawing composition.
Ashley
1-Jan-2006
[124]
Well done, keep up the good progress! ;)
shadwolf
2-Jan-2006
[125x3]
ty ashley   ^^ time i wasn't giving notice of my progress but mainly 
because Gradeint and transform problem where dependent on AGG an 
not on my  script.
but this not means i'm not anymore interrested by the project or 
that the  project is dead. I found like you pretty hudge hopes on 
the integration of High scalable grphics in rebol  ^^
for me to be honnest the advantages of  using SVG instead of images 
 are a lot this is a quick list of my thoughts on what can be done 
with  SVG format.
 - easier embeding of graphical content
- resizing auto ith not grphics quality loss
- cheap but sharp skining 

 - graphical content of an  User  Interface  very low because rebol 
 is pretty able to  work with compression of text content ( compress/decompress)

A little sample to enlight this  compressed SVG file with blender 
logo ->  less than 500 octets (any size can be applyed with no graphic 
loss (aliasing, color loose, blur, pixelisation etc..) )  a fixed 
jped for same content will use  around  50ko. This means less datas 
in memory to as graphic pixel tables are very heavy in VM memory

- Dynamic graphical content. some thing like text scrolling or efffect 
like Flash ones but with  a  reduction of  1000  of the data and 
memory use SVG use a labeling system for  each graphical content 
that compose the image we can provided a tiny system to handle easy 
animation and show/hide of graphical content using raw rebol commands 
-> this will make pretty easier the realisation of dynamic animations 
in rebol ViD content and  as any REBOL/View face is DRaw/AGG capable 
the effects that we can create isn the futur with this idea will 
have no limits  -> this means too to have a pretty fast and ell designed 
SVG engine (that's my actual path on research)
Ashley
2-Jan-2006
[128]
One other big advantage is that there is a lot of high-quality SVG 
in the public domain, and it's growing fast.
JaimeVargas
2-Jan-2006
[129]
Ashely when are you updating RebGUI?
Ashley
3-Jan-2006
[130]
When I find some spare time. ;) Next week or two hopefully.
Joe
3-Jan-2006
[131]
shadwolf, a good example to use with your svg renderer is the word 
map with political borders (public domain license) http://www.mappinghacks.com/maps/world_borders.svgz
shadwolf
3-Jan-2006
[132]
Joe hum inkscape is not able to show this svgz file that's strange 
 ...  I will try to investigate why this happend ...
shadwolf
24-Jan-2006
[133]
surfing around on internet i found another common application for 
SVG -> graphs representation. The idea is inspired by  a ruby project 
http://www.germane-software.com/software/SVG/SVG::Graph/#N10034. 
To do this in rebol we need teh ability to save data in an image 
PNG. The way we can use a thing like this could be to use a simple 
rebol draw based dialect to write  the graphs if we are in REBOL/view 
application the  graph is isealy shown if we need to show the  graph 
in webrowser we can have  2  external sources SVG  and PNG.  For 
importing graphs from another application the SVG is the best way. 
 So our REBOL::SVG::GRAPH would be able to import graphi content 
from a SVG file, output SVG and PNG files, render graphs to REBOL/view 
draw pane, propose a simple way to implement graphs  using a rebol 
dialect.
shadwolf
1-Feb-2006
[134x2]
hum new rebol/view have save/png hability woooooooooooopy so there 
is nothing that prevent us to make a  graph /AGG/SVG/PNG  dialect 
 ^^
if some one is interressed to make it and need informations i'm ready 
to help  ^^
Anton
1-Feb-2006
[136]
View 1.2.1 has save/png, it's not very new...
shadwolf
1-Feb-2006
[137x8]
Anton i discover it recently  ^^
so for me it's new lol but more serriously until AGG was not available 
i think the use of save/png to-image was really not meaning
on a project like an svg graph system save.png take really all it's 
sens imagine a way to make easyly graphs with your rebol GCI to display 
graph stats in your web pages for example
as svg or as png in a simple and easy way
you have that in php and in ruby or php for example why not rebol 
starting from the point that rebol dialectal ability is incredible 
it's a pitty to not take advantage of it  and show ppl hat rebol 
can apport on this particular application and this gives a good way 
to compare rebol to the other scripting language
some thing like
graph [ line "apple" red  5 12  12 8  line "banana" green  1 2 3 
4 6 ]
would be fun i think
Thør
4-Apr-2006
[145]
.
Pekr
20-Jun-2006
[146]
would following news help us to get AGG - SVG compatible gradients? 
It regards AGG 2.4, new branch of AGG, and I am sure we will get 
it ported to REBOL too ...


New utility class template is added, gradient_lut. It allows you 
to easily create a color LUT for gradients from a set of color stops 
as they are defined in SVG, section Gradients and Patterns.
Normand
1-Jul-2006
[147]
If any person is interested in developping graphs in Rebol they may 
find the following links of interest: www.combinatorica.com which 
have the source code in mathematica for calculating graphs and depicting 
them.  There is also the C library at www.graphviz.org and the many 
little languages drivers.
shadwolf
10-Nov-2006
[148x2]
sur i  do  ^^
okay  thank you for the  link  in my  idea  my  SVG/REBOL graph render 
should be easy to  use and render basical graphs  using  a psecial 
graph dialect  but  ofcourse it  will be enhanced afterward...