Well, that example is so simple. I did not generate the svg file, but you can do that with Graphics2D, direct xml, etc. It just transcodes an svg (it was only a test).
Get the code from http://people.apache.org/~baranda/baranda_webcomponents.tar.gz It is an eclipse project with everything packed inside, including a build.xml file to compile, create the jar and the example webapp. Enjoy! :-) Bruno 2005/8/4, Emmanuel Jay <[EMAIL PROTECTED]>: > Thanks for that Bruno > > So in the raster example you generate the primitive shapes on the fly > (using the normal Graphics2D I suppose), then create an SVG document using > the Batik Generator and then use the transcoder to save as JPEG or PNG and > then stream that out... Is that correct? (or you have the SVG and use the > transcoder on it directly) > > I would be very interrested in looking at your code :) > > Thanks, > Emmanuel > > > On 8/4/05, Bruno Aranda <[EMAIL PROTECTED]> wrote: > > Ok, I've uploaded a webapp with the graphicSVG example in > > > > http://people.apache.org/~baranda/baranda.war > > > > Feel free to try it, just drop it in (if possible) clean server and > > that's all. If someone is interested in the source just ask. Now, > > there are two examples: one that just put the svg render in the page > > inside <object> tags and another one that rasters the images > > on-the-fly using the batik libraries. > > > > Now the component is very basic, and it only allows it to raster the > > svg or not and choose between png/jpeg format. No compression at the > > moment, because I only did the component for test purposes... > > > > Every example has the source for the jsp page, in the myfaces examples > way... > > > > Criticism and opinions accepted, of course! > > > > Regards, > > > > Bruno > > > > 2005/8/4, Emmanuel Jay < [EMAIL PROTECTED]>: > > > Yes more SVG browser support is definitely needed... > > > > > > I am interrested in having something like the SVG Generator in Batik > that > > > would provide a very easy way to generate 2d rasters on the fly. In that > > > respect I might even be able to use the SVG generator straight out of > the > > > box I guess (I admit I have never used it, I am currently reviewing what > is > > > the best way to achieve that). > > > > > > In terms of a JSF component I was more refering to a render kit that > would > > > render the SVG generated by the SVG generator. > > > > > > Could you give me a bit more info on what the graphicSvg component > does, > > > and what it offers. Is is build on top of batik? Can I just feed it with > an > > > SVG and it will render it in the browser... will it compress the image? > > > > > > Thanks, > > > > > > Emmanuel > > > > > > > > > > > > On 8/3/05, Bruno Aranda < [EMAIL PROTECTED]> wrote: > > > > And it would not only be needed a new render-kit, but also a new set > > > > of svg components! That are major words... > > > > > > > > Bruno > > > > > > > > 2005/8/3, Bruno Aranda <[EMAIL PROTECTED] >: > > > > > Creating a component that renders svg files would be pretty > > > > > straight-forward, as what you would do is to create a component > which > > > > > accepts the svg files and embedes it in the page using the <object> > > > > > tags... Using the batik library, you could raster the svg files > > > > > on-the-fly to generate PNG or JPEGs. > > > > > If what you want is an SVG render-kit, this is more difficult and > > > > > would imply more code (that was a good idea for the Google summer of > > > > > code!). > > > > > > > > > > I've developed the graphicSvg component (the first case) some time > > > > > ago, but didn't have time to finish it, although it works... more or > > > > > less. However it is capable of showing the SVGs and rastering them. > I > > > > > haven't included it to the sandbox because it has a dependency in > the > > > > > batik library. If someone is interested, feel free to contact me... > > > > > > > > > > For the whole render-kit, maybe that would be another project... > > > > > > > > > > Regards, > > > > > > > > > > Bruno > > > > > > > > > > PS we still need more svg browser support... > > > > > > > > > > 2005/8/3, Emmanuel Jay < [EMAIL PROTECTED]>: > > > > > > Hi all, > > > > > > > > > > > > Are there any plans at all for providing support for SVG or any > other > > > > > > technology enabling the dynamic generation of 2d images? > > > > > > > > > > > > Thanks, > > > > > > Emmanuel Jay > > > > > > > > > > > > > > > > > > > > > > > > >

