xml-general-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vha...@apache.org
Subject cvs commit: xml-site/targets/batik index.html svggen.html
Date Tue, 06 Nov 2001 09:27:35 GMT
vhardy      01/11/06 01:27:35

  Modified:    targets/batik index.html svggen.html
  Log:
  + New splash screen for home page announcing 1.1 coming.
  + Updated svggen doc.
  
  Revision  Changes    Path
  1.21      +1 -1      xml-site/targets/batik/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/xml-site/targets/batik/index.html,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- index.html	2001/10/19 12:34:31	1.20
  +++ index.html	2001/11/06 09:27:35	1.21
  @@ -81,7 +81,7 @@
   
       
           <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD
align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG
border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5"
hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Batik Overview</B></FONT></TD><TD
background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right"
height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
  -        <P align="center"><IMG alt="Batik release 1.0" border="0" hspace="4" src="images/1_0beta2splash.png"
vspace="4"></P>
  +        <P align="center"><IMG alt="Batik release 1.1 is coming" border="0" hspace="4"
src="images/splash.png" vspace="4"></P>
   
           <P align="left">
           Batik is a Java(tm) technology based toolkit for applications that want 
  
  
  
  1.11      +90 -6     xml-site/targets/batik/svggen.html
  
  Index: svggen.html
  ===================================================================
  RCS file: /home/cvs/xml-site/targets/batik/svggen.html,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- svggen.html	2001/08/24 08:42:29	1.10
  +++ svggen.html	2001/11/06 09:27:35	1.11
  @@ -84,7 +84,7 @@
   
           <P align="center"><IMG alt="Batik SVG Generator" border="0" hspace="4"
src="images/svggen.jpg" vspace="4"></P>
           <P align="left">
  -                As SVG(Scalable Vector Graphics) is emerging as a promising graphics format

  +                As SVG (Scalable Vector Graphics) is emerging as a promising graphics format

                   for a wide range of domains and applications, bridging it with Java becomes
important. 
                   This page explains how Batik's <CODE><FONT face="courier, monospaced">SVGGraphics2D</FONT></CODE>,
referred to as the SVG Generator, makes
                   this possible. It is divided into three parts: </P>
  @@ -142,7 +142,7 @@
                   <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0"
width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG
border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD
background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG
border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5"
hspace="0" src="resources/void.gif" vspace="0" width="5"><B>How to use SVGGraphics2D</B></FONT></TD><TD
background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right"
height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
                   <P align="left">
                   From the figure in the previous section we can see that in order for an
instance of <CODE><FONT face="courier, monospaced">SVGGraphics2D</FONT></CODE>
to build      
  -                the SVG content(the DOM tree), an instance of DOM's <CODE><FONT
face="courier, monospaced">Document</FONT></CODE> class is needed. The DOM
tree is an in-memory
  +                the SVG content (the DOM tree), an instance of DOM's <CODE><FONT
face="courier, monospaced">Document</FONT></CODE> class is needed. The DOM
tree is an in-memory
                   representation of the SVG document, which can be further manipulated by
the user using DOM API or be streamed
                   out into any <CODE><FONT face="courier, monospaced">java.io.Writer</FONT></CODE>.

                   </P>
  @@ -244,19 +244,103 @@
      In the previous section, we have just seen that the SVG generation process can be customized
to output SVG style as XML attributes or CSS inline properties. In this section we will talk
about some examples of more advanced customizations.
     </P>
     <P align="left">
  -         Instead of creating the <CODE><FONT face="courier, monospaced">SVGGraphics2D</FONT></CODE>
just by using the <CODE><FONT face="courier, monospaced">Document</FONT></CODE>
that will be used as a factory for creating the SVG elements, we can use the constructor that
use an <CODE><FONT face="courier, monospaced">SVGGeneratorContext</FONT></CODE>
instance. By providing your own <CODE><FONT face="courier, monospaced">SVGGeneratorContext</FONT></CODE>
instance, you will be able to do advanced customization. You will find below three examples
of possible customizations.
  +         Instead of creating the <CODE><FONT face="courier, monospaced">SVGGraphics2D</FONT></CODE>
just by using the <CODE><FONT face="courier, monospaced">Document</FONT></CODE>
that will be used as a factory for creating the SVG elements, we can use the constructor that
use an <CODE><FONT face="courier, monospaced">SVGGeneratorContext</FONT></CODE>
instance. By providing your own <CODE><FONT face="courier, monospaced">SVGGeneratorContext</FONT></CODE>
instance, you will be able to do advanced customization. You will find below several examples
of possible customizations.
     </P>
     <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD
align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG
border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0"
src="resources/void.gif" vspace="0" width="5"><B>Have your own comment in the generated
SVG file</B></FONT></TD><TD background="resources/bar-border-right.gif"
width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="9"></TD></TR><TR><TD align="right" height="12" valign="top"
width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
     <P align="left">
  -  We begin with the simpliest possible example. If you integrate the Batik SVG generator
in your own Java application, you may want to specialize the comment generated in the XML
code. You can proceed as below.
  +  We begin with the simplest possible example. If you integrate the Batik SVG generator
in your own Java application, you may want to specialize the comment generated in the XML
code. You can proceed as below.
     </P>
     <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#ffffff"><PRE>
   
   SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
   ctx.setComment(&quot;Generated by FooApplication with Batik SVG Generator&quot;);
  +SVGGraphics2D g2d = new SVGGraphics2D(ctx);
  +  </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR></TABLE></DIV>
  +
  +  </FONT></TD></TR></TABLE></DIV><BR>
  +  <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD
align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG
border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0"
src="resources/void.gif" vspace="0" width="5"><B>Use Embedded SVG Fonts in the generated
SVG file</B></FONT></TD><TD background="resources/bar-border-right.gif"
width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="9"></TD></TR><TR><TD align="right" height="12" valign="top"
width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
  +  <P align="left">
  +  In order to have a self-contained SVG file that doesn't have to use system fonts to be
displayed, you can embed the fonts you used for drawing strings in the SVG file through the
SVG fonts facility.
  +  </P>
  +  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#ffffff"><PRE>
  +
  +SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
  +ctx.setEmbeddedFontsOn(true);
  +SVGGraphics2D g2d = new SVGGraphics2D(ctx);
  +  </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR></TABLE></DIV>
  +
  +  </FONT></TD></TR></TABLE></DIV><BR>
  +
  +  <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD
align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG
border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0"
src="resources/void.gif" vspace="0" width="5"><B>Customizing the way images are stored</B></FONT></TD><TD
background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right"
height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
  +  <P align="left">
  +        Every time you call one of the <CODE><FONT face="courier, monospaced">drawImage</FONT></CODE>
methods provided by the <CODE><FONT face="courier, monospaced">Graphics2D</FONT></CODE>
class,
  +        a standard representation of your image is created in a location which can be reached
from the generated SVG
  +        file. For instance, a base64 encoding is created and embedded in the SVG file by
default. Alternatively, you
  +        can choose to have your images written to separate files in a predefined directory,
in one of the two raster
  +        formats required by the SVG specification, JPEG or PNG.
  +  </P>
  +  <P align="left">
  +        You can change the default behavior by explicitly providing the image handler to
be used by the SVG generator.
  +        Once again, you use the SVGGeneratorContext for this. In the example below, all
images are converted to PNG
  +        format and written to directory &quot;res/images&quot;.
  +  </P>
  +  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#ffffff"><PRE>
  +
  +SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
  +ImageHandler ihandler = new ImageHandlerPNGEncoder(&quot;res/images&quot;, null);
  +ctx.setImageHandler(ihandler);
   SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);
     </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR></TABLE></DIV>
  +  <P align="left">
  +        Using the default image handlers results in a new copy of the image data being
written to the SVG file or an
  +        external file, for every single <CODE><FONT face="courier, monospaced">drawImage</FONT></CODE>
call. If you use the same images over and over again,
  +        then this may result in an SVG file containing a lot of redundant data. At the
price of a slight performance
  +        penalty during initial generation of the SVG DOM tree, you can choose to have your
image data reused. For this
  +        you use a specialized image handler, as shown below.
  +  </P>
  +  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#ffffff"><PRE>
  +
  +SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
  +
  +// Reuse our embedded base64-encoded image data
  +GenericImageHandler ihandler = new CachedImageHandlerBase64Encoder();
  +ctx.setGenericImageHandler(ihandler);
  +
  +SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);
  +  </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR></TABLE></DIV>
  +  <P align="left">
  +        With the caching image handlers, it is even possible to reuse the same copy of
your image data across
  +        several different SVG documents. Just keep a reference to the image handler, and
pass it to the
  +        <CODE><FONT face="courier, monospaced">CachedImageSVGGraphics2D</FONT></CODE>
instance used for generating the SVG DOM tree. The following
  +        simplified example shows how different SVG trees might be created by separate SVG
generators,
  +        efficiently storing any common images just once.
  +  </P>
  +  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#ffffff"><PRE>
  +  
  +class MySVGGenerator {
  +    // the image handler will write all images files to &quot;res/images&quot;
  +    private static ImageHandler ihandler =
  +        new CachedImageHandlerPNGEncoder(&quot;res/images&quot;, null);
  +    
  +    public void generateSVG(JPanel myCanvas, OutputStream outStream) {
  +        DOMImplementation domImpl =
  +            GenericDOMImplementation.getDOMImplementation();
  +        Document myFactory = domImpl.createDocument(null, &quot;svg&quot;, null);
  +        SVGGeneratorContext ctx =
  +            SVGGeneratorContext.createDefault(myFactory);
  +        ctx.setGenericImageHandler(ihandler);
  +            
  +        SVGGraphics2D svgGenerator =
  +            new SVGGraphics2D(ctx, false);
   
  +        // create the SVG DOM tree
  +        myCanvas.paintComponent(svgGenerator);
  +        
  +        Writer out = new OutputStreamWriter(outStream, &quot;UTF-8&quot;);
  +        svgGenerator.stream(out, true);
  +    }
  +}  </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0"
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2"
height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD></TR></TABLE></DIV>
  +
     </FONT></TD></TR></TABLE></DIV><BR>
   
     <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD
align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG
border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0"
src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD
background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT
color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0"
src="resources/void.gif" vspace="0" width="5"><B>Customizing the generated SVG style</B></FONT></TD><TD
background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right"
height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif"
vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG
border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0"
src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE
border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000"
face="arial,helvetica,sanserif">
  @@ -299,7 +383,7 @@
   SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
   CDATASection styleSheet = myFactory.createCDATASection(&quot;&quot;);
   ctx.setStyleHandler(new StyleSheetStyleHandler(styleSheet));
  -SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);
  +SVGGraphics2D g2d = new SVGGraphics2D(ctx);
   
   // use the g2d to dump drawings (component.paint(g2d))
   
  @@ -381,7 +465,7 @@
   
   SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
   ctx.setExtensionHandler(new SubExtensionHandler());
  -SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);</PRE></TD><TD bgcolor="#0086b2"
width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
  +SVGGraphics2D g2d = new SVGGraphics2D(ctx);</PRE></TD><TD bgcolor="#0086b2"
width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD
bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif"
vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG
border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
     </FONT></TD></TR></TABLE></DIV><BR>
     </FONT></TD></TR></TABLE></DIV><BR>
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: general-cvs-help@xml.apache.org


Mime
View raw message