deweese 2003/03/20 03:55:49
Modified: sources/org/apache/batik/extension/svg
MultiResGraphicsNode.java
Log:
1) Fixed bug in multi-image.
Revision Changes Path
1.3 +5 -9
xml-batik/sources/org/apache/batik/extension/svg/MultiResGraphicsNode.java
Index: MultiResGraphicsNode.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/extension/svg/MultiResGraphicsNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MultiResGraphicsNode.java 20 Nov 2002 12:55:42 -0000 1.2
+++ MultiResGraphicsNode.java 20 Mar 2003 11:55:48 -0000 1.3
@@ -97,8 +97,6 @@
this.srcURLs[i] = srcURLs[i];
if (i < sizes.length)
this.sizes[i] = sizes[i];
- // System.out.println("Sz: " + this.sizes[i]);
- // System.out.println("URL: " + this.srcURLs[i]);
}
this.srcs = new SoftReference[srcURLs.length];
@@ -121,7 +119,6 @@
double scx = Math.sqrt(at.getShearX()*at.getShearX()+
at.getScaleX()*at.getScaleX());
- // System.out.println("SCX: " + scx);
GraphicsNode gn = null;
int idx =-1;
double w = bounds.getWidth()*scx;
@@ -135,8 +132,6 @@
idx = srcURLs.length-1;
gn = getGraphicsNode(idx);
- // System.out.println("GN Idx: " + idx);
-
if (gn == null) return;
Rectangle2D gnBounds = gn.getBounds();
@@ -262,15 +257,16 @@
SVGSVGElement svgElement = imgDocument.getRootElement();
GVTBuilder builder = new GVTBuilder();
- GraphicsNode node = builder.build(ctx, svgElement);
+ GraphicsNode node = builder.build(ctx, imgDocument);
// HACK: remove the clip set by the SVGSVGElement as the overflow
// and clip properties must be ignored. The clip will be set later
// using the overflow and clip of the <image> element.
node.setClip(null);
result.getChildren().add(node);
- // create the implicit viewBox for the SVG image. The viewBox for a
- // SVG image is the viewBox of the outermost SVG element of the SVG file
+ // create the implicit viewBox for the SVG image. The viewBox
+ // for a SVG image is the viewBox of the outermost SVG element
+ // of the SVG file
String viewBox =
svgElement.getAttributeNS(null, SVG_VIEW_BOX_ATTRIBUTE);
float [] vb = ViewBox.parseViewBoxAttribute(e, viewBox);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]