deweese 2004/10/28 18:08:33 Modified: . build.xml samples/tests/spec/scripting intersectionList.svg sources/org/apache/batik/ext/awt/image/codec/tiff TIFFImageEncoder.java sources/org/apache/batik/extension/svg BatikDomExtension.java BatikExtConstants.java BatikMultiImageElement.java BatikMultiImageElementBridge.java FlowDivElement.java FlowLineElement.java FlowParaElement.java FlowRegionBreakElement.java FlowSpanElement.java FlowTextElement.java SVGFlowTextElementBridge.java SolidColorBridge.java SolidColorElement.java Added: sources/org/apache/batik/extension/svg FlowRegionElement.java SubImageElement.java SubImageRefElement.java Log: 1) Fixed bug in PackBits TIFF files with multiple IFD's 2) Lots of small changes to support moving SVG 1.2 features into the SVG namespace. Revision Changes Path 1.153 +2 -2 xml-batik/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-batik/build.xml,v retrieving revision 1.152 retrieving revision 1.153 diff -u -r1.152 -r1.153 --- build.xml 27 Aug 2004 00:42:05 -0000 1.152 +++ build.xml 29 Oct 2004 01:08:33 -0000 1.153 @@ -986,7 +986,7 @@ <path refid="libs-classpath"/> <pathelement location="resources" /> </classpath> -<!-- <jvmarg value="-Xmx512m"/> <jvmarg value="-Xms64m"/> --> +<!-- <jvmarg value="-Xmx512m"/> <jvmarg value="-Xms64m"/> --> <!-- <jvmarg value="-Djava.awt.headless=true"/> --> <arg line="${args}"/> </java> 1.3 +2 -2 xml-batik/samples/tests/spec/scripting/intersectionList.svg Index: intersectionList.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/scripting/intersectionList.svg,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- intersectionList.svg 14 Oct 2004 09:42:00 -0000 1.2 +++ intersectionList.svg 29 Oct 2004 01:08:33 -0000 1.3 @@ -121,7 +121,7 @@ setRect(rect, 255, 200, 2, 50); doCheck(root, rect, ts, "stroke", "crimson"); makeRect(root, rect, "crimson"); - + var tb6 = root.getElementById("testblock6"); 1.7 +5 -2 xml-batik/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java Index: TIFFImageEncoder.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TIFFImageEncoder.java 18 Aug 2004 07:13:56 -0000 1.6 +++ TIFFImageEncoder.java 29 Oct 2004 01:08:33 -0000 1.7 @@ -774,7 +774,7 @@ nextIFDOffset = (int)(tileOffsets[0] + totalBytesOfData); // IFD offsets must be on a word boundary. - if(nextIFDOffset % 2 != 0) { + if ((nextIFDOffset&0x01) != 0) { nextIFDOffset++; skipByte = true; } @@ -1237,7 +1237,10 @@ nextIFDOffset = isLast ? 0 : ifdOffset + dirSize + totalBytes; - skipByte = nextIFDOffset % 2 != 0; + if ((nextIFDOffset&0x01) != 0) { + nextIFDOffset++; + skipByte = true; + } if(outCache == null) { // Original OutputStream must be a SeekableOutputStream. 1.14 +66 -8 xml-batik/sources/org/apache/batik/extension/svg/BatikDomExtension.java Index: BatikDomExtension.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/BatikDomExtension.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- BatikDomExtension.java 18 Aug 2004 07:14:21 -0000 1.13 +++ BatikDomExtension.java 29 Oct 2004 01:08:33 -0000 1.14 @@ -98,42 +98,57 @@ new BatikHistogramNormalizationElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_MULTI_IMAGE_TAG, new BatikMultiImageElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, + BATIK_EXT_SUB_IMAGE_TAG, + new BatikSubImageElementFactory()); + + di.registerCustomElementFactory + (BATIK_12_NAMESPACE_URI, + BATIK_EXT_SUB_IMAGE_REF_TAG, + new BatikSubImageRefElementFactory()); + + di.registerCustomElementFactory + (BATIK_12_NAMESPACE_URI, BATIK_EXT_SOLID_COLOR_TAG, new SolidColorElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_TEXT_TAG, new FlowTextElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_DIV_TAG, new FlowDivElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_PARA_TAG, new FlowParaElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_REGION_BREAK_TAG, new FlowRegionBreakElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, + BATIK_EXT_FLOW_REGION_TAG, + new FlowRegionElementFactory()); + + di.registerCustomElementFactory + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_LINE_TAG, new FlowLineElementFactory()); di.registerCustomElementFactory - (BATIK_EXT_NAMESPACE_URI, + (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_SPAN_TAG, new FlowSpanElementFactory()); @@ -210,6 +225,34 @@ } /** + * To create a 'subImage' element. + */ + protected static class BatikSubImageElementFactory + implements SVGDOMImplementation.ElementFactory { + public BatikSubImageElementFactory() {} + /** + * Creates an instance of the associated element type. + */ + public Element create(String prefix, Document doc) { + return new SubImageElement(prefix, (AbstractDocument)doc); + } + } + + /** + * To create a 'SubImageRef' element. + */ + protected static class BatikSubImageRefElementFactory + implements SVGDOMImplementation.ElementFactory { + public BatikSubImageRefElementFactory() {} + /** + * Creates an instance of the associated element type. + */ + public Element create(String prefix, Document doc) { + return new SubImageRefElement(prefix, (AbstractDocument)doc); + } + } + + /** * To create a 'solidColor' element. */ protected static class SolidColorElementFactory @@ -296,6 +339,21 @@ */ public Element create(String prefix, Document doc) { return new FlowRegionBreakElement(prefix, (AbstractDocument)doc); + } + } + + /** + * To create a 'flowRegion' element. + */ + protected static class FlowRegionElementFactory + implements SVGDOMImplementation.ElementFactory { + public FlowRegionElementFactory() { + } + /** + * Creates an instance of the associated element type. + */ + public Element create(String prefix, Document doc) { + return new FlowRegionElement(prefix, (AbstractDocument)doc); } } 1.19 +10 -0 xml-batik/sources/org/apache/batik/extension/svg/BatikExtConstants.java Index: BatikExtConstants.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/BatikExtConstants.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- BatikExtConstants.java 18 Aug 2004 07:14:21 -0000 1.18 +++ BatikExtConstants.java 29 Oct 2004 01:08:33 -0000 1.19 @@ -24,6 +24,16 @@ public static final String BATIK_EXT_NAMESPACE_URI = "http://xml.apache.org/batik/ext"; + /** Namespace for batik experimental svg 1.2 elements. */ + public static final String BATIK_12_NAMESPACE_URI = + "http://xml.apache.org/batik/ext"; + // "http://www.w3.org/2000/svg"; + + /** Namespace for batik experimental svg 1.2 attributes. */ + public static final String BATIK_12_ATTR_NAMESPACE_URI = + "http://xml.apache.org/batik/ext"; + // null; + /** Tag name for Batik's regular poly extension. */ public static final String BATIK_EXT_REGULAR_POLYGON_TAG = "regularPolygon"; 1.6 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/BatikMultiImageElement.java Index: BatikMultiImageElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/BatikMultiImageElement.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BatikMultiImageElement.java 18 Aug 2004 07:14:21 -0000 1.5 +++ BatikMultiImageElement.java 29 Oct 2004 01:08:33 -0000 1.6 @@ -71,7 +71,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.14 +3 -3 xml-batik/sources/org/apache/batik/extension/svg/BatikMultiImageElementBridge.java Index: BatikMultiImageElementBridge.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/BatikMultiImageElementBridge.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- BatikMultiImageElementBridge.java 18 Aug 2004 07:14:21 -0000 1.13 +++ BatikMultiImageElementBridge.java 29 Oct 2004 01:08:33 -0000 1.14 @@ -77,7 +77,7 @@ * Returns the Batik Extension namespace URI. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** @@ -152,7 +152,7 @@ continue; Element se = (Element)n; - if (!se.getNamespaceURI().equals(BATIK_EXT_NAMESPACE_URI)) + if (!getNamespaceURI().equals(se.getNamespaceURI())) continue; if (se.getLocalName().equals(BATIK_EXT_SUB_IMAGE_TAG)) { addInfo(se, elems, minDim, maxDim, b); 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowDivElement.java Index: FlowDivElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowDivElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowDivElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowDivElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowLineElement.java Index: FlowLineElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowLineElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowLineElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowLineElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowParaElement.java Index: FlowParaElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowParaElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowParaElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowParaElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowRegionBreakElement.java Index: FlowRegionBreakElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowRegionBreakElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowRegionBreakElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowRegionBreakElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowSpanElement.java Index: FlowSpanElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowSpanElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowSpanElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowSpanElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/FlowTextElement.java Index: FlowTextElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/FlowTextElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FlowTextElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ FlowTextElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.15 +29 -30 xml-batik/sources/org/apache/batik/extension/svg/SVGFlowTextElementBridge.java Index: SVGFlowTextElementBridge.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/SVGFlowTextElementBridge.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- SVGFlowTextElementBridge.java 7 Sep 2003 22:25:28 -0000 1.14 +++ SVGFlowTextElementBridge.java 29 Oct 2004 01:08:33 -0000 1.15 @@ -116,7 +116,7 @@ * Returns the SVG namespace URI. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** @@ -356,7 +356,7 @@ for (Node n = element.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() != Node.ELEMENT_NODE) continue; - if (n.getNamespaceURI() != getNamespaceURI()) continue; + if (!getNamespaceURI().equals(n.getNamespaceURI())) continue; Element e = (Element)n; String ln = n.getLocalName(); @@ -376,7 +376,7 @@ for (Node n = div.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() != Node.ELEMENT_NODE) continue; - if (n.getNamespaceURI() != getNamespaceURI()) continue; + if (!getNamespaceURI().equals(n.getNamespaceURI())) continue; Element e = (Element)n; String ln = e.getLocalName(); @@ -439,34 +439,35 @@ List ret = new LinkedList(); for (Node n = element.getFirstChild(); n != null; n = n.getNextSibling()) { + if (n.getNodeType() != Node.ELEMENT_NODE) continue; - if (n.getNamespaceURI() != getNamespaceURI()) continue; + if (!getNamespaceURI().equals(n.getNamespaceURI())) continue; Element e = (Element)n; String ln = e.getLocalName(); - if (BATIK_EXT_FLOW_REGION_TAG.equals(ln)) { - // our default alignment is to the top of the flow rect. - float verticalAlignment = 0.0f; - String verticalAlignmentAttribute - = e.getAttribute(BATIK_EXT_VERTICAL_ALIGN_ATTRIBUTE); - - if ((verticalAlignmentAttribute != null) && - (verticalAlignmentAttribute.length() > 0)) { - if (BATIK_EXT_ALIGN_TOP_VALUE.equals - (verticalAlignmentAttribute)) { - verticalAlignment = 0.0f; - } else if (BATIK_EXT_ALIGN_MIDDLE_VALUE.equals - (verticalAlignmentAttribute)) { - verticalAlignment = 0.5f; - } else if (BATIK_EXT_ALIGN_BOTTOM_VALUE.equals - (verticalAlignmentAttribute)) { - verticalAlignment = 1.0f; - } - } + if (!BATIK_EXT_FLOW_REGION_TAG.equals(ln)) continue; - gatherRegionInfo(ctx, e, verticalAlignment, ret); + // our default alignment is to the top of the flow rect. + float verticalAlignment = 0.0f; + String verticalAlignmentAttribute + = e.getAttribute(BATIK_EXT_VERTICAL_ALIGN_ATTRIBUTE); + + if ((verticalAlignmentAttribute != null) && + (verticalAlignmentAttribute.length() > 0)) { + if (BATIK_EXT_ALIGN_TOP_VALUE.equals + (verticalAlignmentAttribute)) { + verticalAlignment = 0.0f; + } else if (BATIK_EXT_ALIGN_MIDDLE_VALUE.equals + (verticalAlignmentAttribute)) { + verticalAlignment = 0.5f; + } else if (BATIK_EXT_ALIGN_BOTTOM_VALUE.equals + (verticalAlignmentAttribute)) { + verticalAlignment = 1.0f; + } } + + gatherRegionInfo(ctx, e, verticalAlignment, ret); } return ret; @@ -479,9 +480,8 @@ n != null; n = n.getNextSibling()) { if (n.getNodeType() != Node.ELEMENT_NODE) continue; - if (n.getNamespaceURI() != getNamespaceURI()) continue; + if (!getNamespaceURI().equals(n.getNamespaceURI())) continue; Element e = (Element)n; - String ln = n.getLocalName(); if (ln.equals(SVGConstants.SVG_RECT_TAG)) { UnitProcessor.Context uctx; @@ -563,7 +563,6 @@ if (!SVGUtilities.matchUserAgent(element, ctx.getUserAgent())) { return; } - String s = XMLSupport.getXMLSpace(element); boolean preserve = s.equals(SVG_PRESERVE_VALUE); boolean first = true; @@ -591,8 +590,8 @@ switch (n.getNodeType()) { case Node.ELEMENT_NODE: // System.out.println("Element: " + n); - if ((n.getNamespaceURI() != getNamespaceURI()) && - (n.getNamespaceURI() != SVG_NAMESPACE_URI)) { + if ((!getNamespaceURI().equals(n.getNamespaceURI())) && + (!SVG_NAMESPACE_URI.equals(n.getNamespaceURI()))) { break; } 1.9 +1 -1 xml-batik/sources/org/apache/batik/extension/svg/SolidColorBridge.java Index: SolidColorBridge.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/SolidColorBridge.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- SolidColorBridge.java 18 Aug 2004 07:14:22 -0000 1.8 +++ SolidColorBridge.java 29 Oct 2004 01:08:33 -0000 1.9 @@ -60,7 +60,7 @@ * Returns the SVG namespace URI. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.5 +2 -2 xml-batik/sources/org/apache/batik/extension/svg/SolidColorElement.java Index: SolidColorElement.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/extension/svg/SolidColorElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SolidColorElement.java 18 Aug 2004 07:14:22 -0000 1.4 +++ SolidColorElement.java 29 Oct 2004 01:08:33 -0000 1.5 @@ -57,7 +57,7 @@ * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { - return BATIK_EXT_NAMESPACE_URI; + return BATIK_12_NAMESPACE_URI; } /** 1.1 xml-batik/sources/org/apache/batik/extension/svg/FlowRegionElement.java Index: FlowRegionElement.java =================================================================== /* Copyright 2002-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.extension.svg; import org.apache.batik.dom.AbstractDocument; import org.apache.batik.extension.PrefixableStylableExtensionElement; import org.w3c.dom.Node; /** * This class implements a regular polygon extension to SVG * * @author <a href="mailto:[EMAIL PROTECTED]">Thomas DeWeese</a> * @version $Id: FlowRegionElement.java,v 1.1 2004/10/29 01:08:33 deweese Exp $ */ public class FlowRegionElement extends PrefixableStylableExtensionElement implements BatikExtConstants { /** * Creates a new BatikRegularPolygonElement object. */ protected FlowRegionElement() { } /** * Creates a new BatikRegularPolygonElement object. * @param prefix The namespace prefix. * @param owner The owner document. */ public FlowRegionElement(String prefix, AbstractDocument owner) { super(prefix, owner); } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return BATIK_EXT_FLOW_REGION_TAG; } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { return BATIK_12_NAMESPACE_URI; } /** * Returns a new uninitialized instance of this object's class. */ protected Node newNode() { return new FlowRegionElement(); } } 1.1 xml-batik/sources/org/apache/batik/extension/svg/SubImageElement.java Index: SubImageElement.java =================================================================== /* Copyright 2002-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.extension.svg; import org.apache.batik.dom.AbstractDocument; import org.apache.batik.extension.PrefixableStylableExtensionElement; import org.w3c.dom.Node; /** * This class implements a multiImage extension to SVG. * * The 'multiImage' element is similar to the 'image' element (supports * all the same attributes and properties) except. * <ol> * <li>It can only be used to reference raster content (this is an * implementation thing really)</li> * <li>It has two addtional attributes: 'pixel-width' and * 'pixel-height' which are the maximum width and height of the * image referenced by the xlink:href attribute.</li> * <li>It can contain a child element 'subImage' which has only * three attributes, pixel-width, pixel-height and xlink:href. * The image displayed is the smallest image such that * pixel-width and pixel-height are greater than or equal to the * required image size for display.</li> * </ol> * * @author <a href="mailto:[EMAIL PROTECTED]">Thomas DeWeese</a> * @version $Id: SubImageElement.java,v 1.1 2004/10/29 01:08:33 deweese Exp $ */ public class SubImageElement extends PrefixableStylableExtensionElement implements BatikExtConstants { /** * Creates a new SubImageElement object. */ protected SubImageElement() { } /** * Creates a new SubImageElement object. * @param prefix The namespace prefix. * @param owner The owner document. */ public SubImageElement(String prefix, AbstractDocument owner) { super(prefix, owner); } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return BATIK_EXT_SUB_IMAGE_TAG; } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { return BATIK_12_NAMESPACE_URI; } /** * Returns a new uninitialized instance of this object's class. */ protected Node newNode() { return new SubImageElement(); } } 1.1 xml-batik/sources/org/apache/batik/extension/svg/SubImageRefElement.java Index: SubImageRefElement.java =================================================================== /* Copyright 2002-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.extension.svg; import org.apache.batik.dom.AbstractDocument; import org.apache.batik.extension.PrefixableStylableExtensionElement; import org.w3c.dom.Node; /** * This class implements a multiImage extension to SVG. * * The 'multiImage' element is similar to the 'image' element (supports * all the same attributes and properties) except. * <ol> * <li>It can only be used to reference raster content (this is an * implementation thing really)</li> * <li>It has two addtional attributes: 'pixel-width' and * 'pixel-height' which are the maximum width and height of the * image referenced by the xlink:href attribute.</li> * <li>It can contain a child element 'subImage' which has only * three attributes, pixel-width, pixel-height and xlink:href. * The image displayed is the smallest image such that * pixel-width and pixel-height are greater than or equal to the * required image size for display.</li> * </ol> * * @author <a href="mailto:[EMAIL PROTECTED]">Thomas DeWeese</a> * @version $Id: SubImageRefElement.java,v 1.1 2004/10/29 01:08:33 deweese Exp $ */ public class SubImageRefElement extends PrefixableStylableExtensionElement implements BatikExtConstants { /** * Creates a new SubImageRefElement object. */ protected SubImageRefElement() { } /** * Creates a new SubImageRefElement object. * @param prefix The namespace prefix. * @param owner The owner document. */ public SubImageRefElement(String prefix, AbstractDocument owner) { super(prefix, owner); } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getLocalName()}. */ public String getLocalName() { return BATIK_EXT_SUB_IMAGE_REF_TAG; } /** * <b>DOM</b>: Implements [EMAIL PROTECTED] org.w3c.dom.Node#getNamespaceURI()}. */ public String getNamespaceURI() { return BATIK_12_NAMESPACE_URI; } /** * Returns a new uninitialized instance of this object's class. */ protected Node newNode() { return new SubImageRefElement(); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]