01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.dom.svg12;
20:
21: import org.apache.batik.dom.AbstractDocument;
22: import org.apache.batik.dom.svg.SVGStylableElement;
23: import org.apache.batik.util.SVG12Constants;
24: import org.w3c.dom.Node;
25:
26: /**
27: * This class implements a multiImage extension to SVG.
28: *
29: * The 'multiImage' element is similar to the 'image' element (supports
30: * all the same attributes and properties) except.
31: * <ol>
32: * <li>It can only be used to reference raster content (this is an
33: * implementation thing really)</li>
34: * <li>It has two addtional attributes: 'pixel-width' and
35: * 'pixel-height' which are the maximum width and height of the
36: * image referenced by the xlink:href attribute.</li>
37: * <li>It can contain a child element 'subImage' which has only
38: * three attributes, pixel-width, pixel-height and xlink:href.
39: * The image displayed is the smallest image such that
40: * pixel-width and pixel-height are greater than or equal to the
41: * required image size for display.</li>
42: * </ol>
43: *
44: * @author <a href="mailto:thomas.deweese@kodak.com">Thomas DeWeese</a>
45: * @version $Id: SVGOMSubImageRefElement.java 475477 2006-11-15 22:44:28Z cam $ */
46: public class SVGOMSubImageRefElement extends SVGStylableElement {
47:
48: /**
49: * Creates a new SubImageRefElement object.
50: */
51: protected SVGOMSubImageRefElement() {
52: }
53:
54: /**
55: * Creates a new SubImageRefElement object.
56: * @param prefix The namespace prefix.
57: * @param owner The owner document.
58: */
59: public SVGOMSubImageRefElement(String prefix, AbstractDocument owner) {
60: super (prefix, owner);
61: }
62:
63: /**
64: * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}.
65: */
66: public String getLocalName() {
67: return SVG12Constants.SVG_SUB_IMAGE_REF_TAG;
68: }
69:
70: /**
71: * Returns a new uninitialized instance of this object's class.
72: */
73: protected Node newNode() {
74: return new SVGOMSubImageRefElement();
75: }
76: }
|