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

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.
shadwolf
5-Oct-2005
[514]
warn me when update is done ^^ I could finalise my SVG renderer widget 
for rebgui  ^^
Christian
9-Oct-2005
[515]
would it be possible to create a /view version for linux w/o need 
for an x server?
DideC
10-Oct-2005
[516]
Without X, no display except console. So it's not View anymore.
What do you need from View that is not in Core ?
Christian
10-Oct-2005
[517x3]
I'm only interested in dynamically generating images on the server 
for delivery within web browsers. That's another fantastic use case 
for REBOL/View.
Think chart servers, sparklines &c.
I'm quite reluctant to install X on a _web-accessible server_ just 
for /View, tho (and, hopefully, so is everyone else). Even the Java 
folks got that right, eventually - Java can run in "headless" mode, 
and yet allows people to access graphics functionality like Java 
2D &c.
Robert
10-Oct-2005
[520]
What you need is rebface
Volker
10-Oct-2005
[521]
maybe vnc is a compromize? i guess rebface wants x too, for fonts?
Gabriele
10-Oct-2005
[522]
Command allows you to use images and the effect pipeline without 
view functionality, afaik.