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

World: r3wp

[AGG] to discus new Rebol/View with AGG

Geomol
2-Sep-2005
[464]
Cool Kru! :-)
Rebolek
2-Sep-2005
[465]
thanks :)
Geomol
5-Sep-2005
[466]
In the new DRAW dialect, should SCALE have influence on LINE-WIDTH?
Gabriele
5-Sep-2005
[467x2]
that is a very hard question, because in most vector drawing apps 
it doesn't, while it is also arguable that it should.
also, i don't know if AGG is able to scale a line width if the scale 
is not the same for x and y.
Anton
6-Sep-2005
[469]
That seems like a frustrating issue.
shadwolf
6-Sep-2005
[470x3]
Cyphre thank you for your answer You need more infos on Gradient 
here is the official webpage on the topic hopes it  could help you 
to make a svg gradient complying fonction in draw  ...:)
http://www.w3.org/TR/SVG/pservers.html
Cyphre there is no missing thing in AGG  gradient the coordinate 
datas given by SVG gradient data block is different. To make it short 
and simple SVG work with area pourcentage of filling (what ever the 
 size of the area to colorize is you will allways have red 20% blue 
40% black  40% if red blue black are your 3 colors that are used 
to make the gradient effect) Then we have a vectorial information 
that  give the orrientation of the gradient effect. SVG gradeint 
are linear, circular or parterned (in most case linear is applyed 
...). REbol AGG gradient use area offset you have a start offset 
a end offset and the  colors are degraded along this vector  nothing 
more nothing less you have no area coloring infos. This is if  my 
recalls are good the differencies betwin AGG gradient and SVG gradient.
Pekr
6-Sep-2005
[473]
and the proposed solution is? Can we have some helper parameters 
in rebol AGG to allow SVG kind of parameters? Are AGG gradients subset 
of SVG? Is there 1:1 equation, so that we can transform between the 
two? Maybe the problem is a bit more complex?
shadwolf
6-Sep-2005
[474]
Pekr and the solution proposed by Cyphre  was to insert to agg in 
built fonction complying with SVG datas ...
Pekr
6-Sep-2005
[475]
yes, that should be enoug, no? If Cyphre can use AGG internals to 
simply make it working, so he will, no?
shadwolf
6-Sep-2005
[476]
Pekr yes we can do adaptation but this will enslow dramatically the 
SVG rendering. My goal is to make a SVG widget capable for REbGUI 
 to dispaly graphic content like tool bars, logo etc so faster is 
the render better it's
Pekr
6-Sep-2005
[477x3]
he can create e.g. gradient-svg command ...
I am not talking about adaptation in rebol level code, but directly 
in rebol AGG layer = C code - that should not be slow, no? Cyphre 
would then expose it via e.g. gradient-svg new command ...
we have e.g. new natives for rgb-to-hsv and hsv-to-rgb already ...
shadwolf
6-Sep-2005
[480]
yes that was what he had in mind and that perfect feet my need  ^^. 
But he asked me in Carl's only  group some more detailled informations 
about SVG way to handle gradients. Th'at why i give him the link 
to the gradient SVG official documentation and why i make this simple 
explaination ;:)
Pekr
6-Sep-2005
[481]
it was simulated in rebol level, was found being slow, so Carl reacted 
upon the request and made those functions native, as they became 
usable for us ...
shadwolf
6-Sep-2005
[482x3]
yes the actual svg render have been made in one week it's pretty 
fast and the code is very tiny ( 400 lines for a svg to AGG/Vid rendering 
engine that not so mutch  ^^)
basically SVG is a XML  structure but for several reasons i choose 
to pass thru a XML 2 Object converstion and then I  treat the SVG 
infos converted to rebol objet structure ;)
main reaseon to act like that xas svg recursion structure is a nightmare 
if you use parse or xml-parse
Pekr
6-Sep-2005
[485]
xml-to-object? Are you talking about Gavain Mckenzie's parsing XML 
stuff?
shadwolf
6-Sep-2005
[486x2]
yes exactly ;)
http://shadwolf.free.fr/svg-demo-shad05.zip
http://shadwolf.free.fr/svg-demo-shad06.r
Pekr
6-Sep-2005
[488]
I found it being really excellent ... but - it is based upon old-good 
'parse itself of course :-) anyway - way much more usefull than xml-parse, 
which is imo absolutly insufficient for real work - but it is long 
time I looked into it ...
shadwolf
6-Sep-2005
[489x2]
see those link  05.zip countains an sVG sample file and the 05 code 
 06.r is the more advanced version i made
I try as often i can to retake other ones ideas to enlight them and 
make my own production being very smooth ;)
Pekr
6-Sep-2005
[491]
05.zip url is wrong probably ... I downloaded 06.zip
shadwolf
6-Sep-2005
[492x2]
http://shadwolf.free.fr/svg-demo-shad06.zip
yes you are right 05  have been remplaced by 06 ...
Cyphre
7-Sep-2005
[494x2]
Shadwolf: so you are missing the percentage ratios of gradient colors? 
I have been thinking about this enhancment too. I can't tell you 
when this will be added but I believe I'll try to add it during the 
next gradient redesign phase.
Geomol: in the next DRAW update there should be scalable line-width 
available.
Geomol
7-Sep-2005
[496]
Okay! :-) I'll contact you privately. I got some questions, if you 
have a little time.
Rebolek
7-Sep-2005
[497]
There is some 1.3.1d or so called 1.3.2 beta VIEW version. Are the 
AGG fixes going to be part of it?
Cyphre
7-Sep-2005
[498]
No, this version fixes couple of binding bugs afaik.
Anton
8-Sep-2005
[499]
Cool :)
Geomol
9-Sep-2005
[500]
I think, there's a bug with colour keying in DRAW, when doing an 
IMAGE. Grey-tones seems to work, and also the green colour 0.136.0, 
but most other colours don't work!?
Cyphre
13-Sep-2005
[501]
The colour keying bug is known issue and was fixed for the next release. 
Anyway thanks for reporting ;)
Pekr
13-Sep-2005
[502]
:-)
Cyphre
13-Sep-2005
[503]
I also read someone reporting problems with different characters 
rendered using AGG. This should be also fixed in the next release.
Pekr
13-Sep-2005
[504]
ah, I just wanted to ask! Thanks ...
shadwolf
16-Sep-2005
[505x4]
cyphre :

here you have a tiny example of gradient representation taken from 
the webpage http://www.w3.org/TR/SVG/pservers.htmlwitch explain 
the gradient format for SVG 
Simple linear gradient commented by me  ^^
<g>
    <defs>
# LinearGradient definitions 
        <linearGradient id="MyGradient">
#first color using 5% of the space to color
            <stop offset="5%" stop-color="#F60" />
# second color using 95% of the space to color
            <stop offset="95%" stop-color="#FF6" />
     </linearGradient>
  </defs>

# HERE you have the rect definition using the LinearGradient witch 
id is MyGradient

   <rect fill="url(#MyGradient)" stroke="black" stroke-width="5" x="100" 
   y="100"  width="600" height="200" />  
</g>    

So as you can see the color pourcentages
Example for RadialGradient taken  from the same when page 
<g>
<defs>

         <radialGradient id="MyGradient" gradientUnits="userSpaceOnUse"
cx="400" fy="200">
       <stop offset="0%" stop-color="red" />
       <stop offset="50%" stop-color="blue" />
       <stop offset="100%" stop-color="red" />
   </radialGradient>
</defs>

<rect fill="url(#MyGradient)" stroke="black" stroke-width="5" x="100" 
y="100"  width="600" height="200" />
</g>


The radialGradient definition system is quite the same as linearGradient 
the only change is the center point x of the circular effect and 
it's y ray lenght
I hope you get all the informations now to make gradient function 
in AGG/Draw complying with SVG informations
I tryed svg-demo-shad06.r under linux with wine rebol/view 1.3.1d 
and with the rebol/view 1.3beta version and the SVG renderer script 
present the same matrix tra	nsformation problem but the good news 
is that the rebol/view 1.3 for windows  and the rebol/view 1.3 for 
linuw are working both on linux using svg-demo-shad06.r script
Cyphre
18-Sep-2005
[509x2]
Yes, those versions(win linux) should be indentical. (except font 
handling)
Regarding the gradients: Thanks for the examples. Anyway, I've already 
known that you are missing the gradient color ratios so it is just 
a matter of time and priorities when this will be added so please 
be patient ;-)
yeksoon
21-Sep-2005
[511]
Draw SVG/AGG have progress so far that I cannot catch up with what 
it supports currently.


Does anyone have a quick feature overview of this? either a link 
or point form will do.
Cyphre
23-Sep-2005
[512x2]
yeksoon: here you can read latest version of DRAW docs:
http://www.rebol.com/docs/draw-ref.html
t is work-in-progress so there are some 'inconsisencies'. We are 
working on update soon.