Hi,
I am pretty new to SVG and Batik software so please be little patient.

My question is:-
I have created a servlet which creates a SVG document and this SVG Stream I
show on the my jsp page as an embeded object. The SVG document which I
created is Simple block diagram which is generated at run time. My
requirement is to add a onMouseover event to each of this blocks in SVG to
show some notes about the block . ( Just like "alt" message on html image
tag ). Following is the code which i used to create the block diagram which
is downloaded from you side.



                  DOMImplementation domImpl =
SVGDOMImplementation.getDOMImplementation();
                  String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
                  Document document =     domImpl.createDocument(svgNS,
"svg", null);

                        SVGGraphics2D svgGraphicsEnvironment = new
SVGGraphics2D(document);
                  svgGraphicsEnvironment.setSVGCanvasSize( new
Dimension(width+10, height+10)      );

                  mondrian.paint( svgGraphicsEnvironment );

                  ByteArrayOutputStream baos = new ByteArrayOutputStream(
8192 );
                  Writer svgOutput = new OutputStreamWriter(baos, "UTF-8");
                        svgGraphicsEnvironment.stream(svgOutput, true);

                                                  //Adding block
                  svgGraphicsEnvironment.drawRect(0,100, 200 , 300 );

                    if (imgType.equals("svg")) {
                                  emitSVG( request, response,
baos.toString() );
                   }else{
                        if (request.getHeader("Accept").indexOf("png") >=
0){
                              emitPNG( request, response, baos.toString()
);
                        }else{
                              emitJPG( request, response, baos.toString()
);
                        }
                            }


Any code sample would be of great help. Thanks in advance.

Thanks & Regards,
Srini


This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to