You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by de...@apache.org on 2005/06/01 03:37:16 UTC
cvs commit: xml-batik/xdocs svggen.xml
deweese 2005/05/31 18:37:16
Modified: xdocs svggen.xml
Log:
Implementing Documentation fixes suggested by Arne.
Thanks!
Revision Changes Path
1.15 +5 -5 xml-batik/xdocs/svggen.xml
Index: svggen.xml
===================================================================
RCS file: /home/cvs/xml-batik/xdocs/svggen.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- svggen.xml 18 Aug 2004 07:17:21 -0000 1.14
+++ svggen.xml 1 Jun 2005 01:37:16 -0000 1.15
@@ -244,7 +244,7 @@
<source>
SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(myFactory);
-ImageHandler ihandler = new ImageHandlerPNGEncoder("res/images", null);
+GenericImageHandler ihandler = new ImageHandlerPNGEncoder("res/images", null);
ctx.setImageHandler(ihandler);
SVGGraphics2D g2d = new SVGGraphics2D(ctx, false);
</source>
@@ -306,7 +306,7 @@
</p>
<source>
-public class StyleSheetStyleHandler {
+public class StyleSheetStyleHandler implements StyleHandler {
private CDATASection styleSheet;
// Build the handler with a reference to the StyleSheet section
public StyleSheetStyleHandler(CDATASection styleSheet) {
@@ -345,7 +345,7 @@
// use the g2d to dump drawings (component.paint(g2d))
// add a style sheet to the definition section
-Element root = g2d.getRoot();
+SVGSVGElement root = (SVGSVGElement)g2d.getRoot();
Element defs = root.getElementById(SVGSyntax.ID_PREFIX_GENERIC_DEFS);
Element style = myFactory.createElementNS(SVGSyntax.SVG_NAMESPACE_URI,
SVGSyntax.SVG_STYLE_TAG);
@@ -377,7 +377,7 @@
Element grad = generatorCtx.getDOMFactory().
createElementNS(SVGSyntax.SVG_NAMESPACE_URI,
SVGSyntax.SVG_LINEAR_GRADIENT_TAG);
- grad.setAttributeNS(null, SVGSyntax.SVG_ID_ATTRIBUTE, ref);
+ grad.setAttributeNS(null, SVGSyntax.SVG_ID_ATTRIBUTE, id);
grad.setAttributeNS(null,
SVGSyntax.SVG_GRADIENT_UNITS_ATTRIBUTE,
SVGSyntax.SVG_USER_SPACE_ON_USE_VALUE);