source: josm/trunk/patches/10trim_svgsalamander.patch @ 8356

Last change on this file since 8356 was 8083, checked in by bastiK, 5 years ago

update svgsalamander to r200

File size: 10.1 KB
RevLine 
[7676]1Only in kitfox/svg: animation
2Only in kitfox/svg/app/ant: SVGToImageAntTask.java
3Only in kitfox/svg/app/beans: ProportionalLayoutPanel.form
4Only in kitfox/svg/app/beans: ProportionalLayoutPanel.java
5Only in kitfox/svg/app/beans: SVGPanel.form
6Only in kitfox/svg/app/beans: SVGPanel.java
7Only in kitfox/svg/app/data: HandlerFactory.java
8Only in kitfox/svg/app: MainFrame.form
9Only in kitfox/svg/app: MainFrame.java
10Only in kitfox/svg/app: PlayerDialog.form
11Only in kitfox/svg/app: PlayerDialog.java
12Only in kitfox/svg/app: PlayerThread.java
13Only in kitfox/svg/app: PlayerThreadListener.java
14Only in kitfox/svg/app: SVGPlayer.form
15Only in kitfox/svg/app: SVGPlayer.java
16Only in kitfox/svg/app: SVGViewer.form
17Only in kitfox/svg/app: SVGViewer.java
18Only in kitfox/svg/app: VersionDialog.form
19Only in kitfox/svg/app: VersionDialog.java
20Only in kitfox/svg: SVGDisplayPanel.form
[8083]21Only in kitfox/svg: SVGDisplayPanel.java
[7676]22diff -ur kitfox/svg/SVGElement.java src/com/kitfox/svg/SVGElement.java
[8083]23--- kitfox/svg/SVGElement.java  2015-02-18 15:16:19.968664918 +0100
24+++ src/com/kitfox/svg/SVGElement.java  2015-02-18 15:25:38.763435836 +0100
[7676]25@@ -35,9 +35,6 @@
26  */
27 package com.kitfox.svg;
28 
29-import com.kitfox.svg.animation.AnimationElement;
30-import com.kitfox.svg.animation.TrackBase;
31-import com.kitfox.svg.animation.TrackManager;
32 import com.kitfox.svg.pathcmd.Arc;
33 import com.kitfox.svg.pathcmd.BuildHistory;
34 import com.kitfox.svg.pathcmd.Cubic;
35@@ -122,10 +119,6 @@
36      * The diagram this element belongs to
37      */
38     protected SVGDiagram diagram;
39-    /**
40-     * Link to the universe we reside in
41-     */
42-    protected final TrackManager trackManager = new TrackManager();
43     boolean dirty = true;
44 
45     /**
46@@ -305,65 +298,6 @@
47         }
48     }
49 
50-    public void removeAttribute(String name, int attribType)
51-    {
52-        switch (attribType)
53-        {
54-            case AnimationElement.AT_CSS:
55-                inlineStyles.remove(name);
56-                return;
57-            case AnimationElement.AT_XML:
58-                presAttribs.remove(name);
59-                return;
60-        }
61-    }
62-
63-    public void addAttribute(String name, int attribType, String value) throws SVGElementException
64-    {
65-        if (hasAttribute(name, attribType))
66-        {
67-            throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists");
68-        }
69-
70-        //Alter layout for id attribute
71-        if ("id".equals(name))
72-        {
73-            if (diagram != null)
74-            {
75-                diagram.removeElement(id);
76-                diagram.setElement(value, this);
77-            }
78-            this.id = value;
79-        }
80-
81-        switch (attribType)
82-        {
83-            case AnimationElement.AT_CSS:
84-                inlineStyles.put(name, new StyleAttribute(name, value));
85-                return;
86-            case AnimationElement.AT_XML:
87-                presAttribs.put(name, new StyleAttribute(name, value));
88-                return;
89-        }
90-
91-        throw new SVGElementException(this, "Invalid attribute type " + attribType);
92-    }
93-
94-    public boolean hasAttribute(String name, int attribType) throws SVGElementException
95-    {
96-        switch (attribType)
97-        {
98-            case AnimationElement.AT_CSS:
99-                return inlineStyles.containsKey(name);
100-            case AnimationElement.AT_XML:
101-                return presAttribs.containsKey(name);
102-            case AnimationElement.AT_AUTO:
103-                return inlineStyles.containsKey(name) || presAttribs.containsKey(name);
104-        }
105-
106-        throw new SVGElementException(this, "Invalid attribute type " + attribType);
107-    }
108-
109     /**
110      * @return a set of Strings that corespond to CSS attributes on this element
111      */
112@@ -389,12 +323,6 @@
113         children.add(child);
114         child.parent = this;
115         child.setDiagram(diagram);
116-
117-        //Add info to track if we've scanned animation element
118-        if (child instanceof AnimationElement)
119-        {
120-            trackManager.addTrackElement((AnimationElement) child);
121-        }
122     }
123 
124     protected void setDiagram(SVGDiagram diagram)
125@@ -529,61 +457,6 @@
126         return getStyle(attrib, true);
127     }
128 
129-    public void setAttribute(String name, int attribType, String value) throws SVGElementException
130-    {
131-        StyleAttribute styAttr;
132-
133-
134-        switch (attribType)
135-        {
136-            case AnimationElement.AT_CSS:
137-            {
138-                styAttr = (StyleAttribute) inlineStyles.get(name);
139-                break;
140-            }
141-            case AnimationElement.AT_XML:
142-            {
143-                styAttr = (StyleAttribute) presAttribs.get(name);
144-                break;
145-            }
146-            case AnimationElement.AT_AUTO:
147-            {
148-                styAttr = (StyleAttribute) inlineStyles.get(name);
149-
150-                if (styAttr == null)
151-                {
152-                    styAttr = (StyleAttribute) presAttribs.get(name);
153-                }
154-                break;
155-            }
156-            default:
157-                throw new SVGElementException(this, "Invalid attribute type " + attribType);
158-        }
159-
160-        if (styAttr == null)
161-        {
162-            throw new SVGElementException(this, "Could not find attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ").  Make sure to create attribute before setting it.");
163-        }
164-
165-        //Alter layout for relevant attributes
166-        if ("id".equals(styAttr.getName()))
167-        {
168-            if (diagram != null)
169-            {
170-                diagram.removeElement(this.id);
171-                diagram.setElement(value, this);
172-            }
173-            this.id = value;
174-        }
175-
176-        styAttr.setStringValue(value);
177-    }
178-
179-    public boolean getStyle(StyleAttribute attrib, boolean recursive) throws SVGException
180-    {
181-        return getStyle(attrib, recursive, true);
182-    }
183-   
184     /**
185      * Copies the current style into the passed style attribute. Checks for
186      * inline styles first, then internal and extranal style sheets, and finally
187@@ -595,8 +468,7 @@
188      * style attribute, checks attributes of parents back to root until one
189      * found.
190      */
191-    public boolean getStyle(StyleAttribute attrib, boolean recursive, boolean evalAnimation)
192-            throws SVGException
193+    public boolean getStyle(StyleAttribute attrib, boolean recursive) throws SVGException
194     {
195         String styName = attrib.getName();
196 
197@@ -605,17 +477,6 @@
198 
199         attrib.setStringValue(styAttr == null ? "" : styAttr.getStringValue());
200 
201-        //Evalutate coresponding track, if one exists
202-        if (evalAnimation)
203-        {
204-            TrackBase track = trackManager.getTrack(styName, AnimationElement.AT_CSS);
205-            if (track != null)
206-            {
207-                track.getValue(attrib, diagram.getUniverse().getCurTime());
208-                return true;
209-            }
210-        }
211-
212         //Return if we've found a non animated style
213         if (styAttr != null)
214         {
215@@ -628,17 +489,6 @@
216 
217         attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue());
218 
219-        //Evalutate coresponding track, if one exists
220-        if (evalAnimation)
221-        {
222-            TrackBase track = trackManager.getTrack(styName, AnimationElement.AT_XML);
223-            if (track != null)
224-            {
225-                track.getValue(attrib, diagram.getUniverse().getCurTime());
226-                return true;
227-            }
228-        }
229-
230         //Return if we've found a presentation attribute instead
231         if (presAttr != null)
232         {
233@@ -700,14 +550,6 @@
234         //Copy presentation value directly
235         attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue());
236 
237-        //Evalutate coresponding track, if one exists
238-        TrackBase track = trackManager.getTrack(presName, AnimationElement.AT_XML);
239-        if (track != null)
240-        {
241-            track.getValue(attrib, diagram.getUniverse().getCurTime());
242-            return true;
243-        }
244-
245         //Return if we found presentation attribute
246         if (presAttr != null)
247         {
248diff -ur kitfox/svg/SVGLoaderHelper.java src/com/kitfox/svg/SVGLoaderHelper.java
[8083]249--- kitfox/svg/SVGLoaderHelper.java     2015-02-18 15:16:20.160665871 +0100
250+++ src/com/kitfox/svg/SVGLoaderHelper.java     2015-02-18 15:25:38.763435836 +0100
[7676]251@@ -37,9 +37,6 @@
252 package com.kitfox.svg;
253 
254 import java.net.*;
255-import java.io.*;
256-
257-import com.kitfox.svg.animation.parser.*;
258 
259 /**
260  * @author Mark McKay
261@@ -58,11 +55,6 @@
262     public final SVGDiagram diagram;
263 
264     public final URI xmlBase;
265-
266-    /**
267-     * Animate nodes use this to parse their time strings
268-     */
269-    public final AnimTimeParser animTimeParser = new AnimTimeParser(new StringReader(""));
270     
271     /** Creates a new instance of SVGLoaderHelper */
272     public SVGLoaderHelper(URI xmlBase, SVGUniverse universe, SVGDiagram diagram)
273diff -ur kitfox/svg/SVGLoader.java src/com/kitfox/svg/SVGLoader.java
[8083]274--- kitfox/svg/SVGLoader.java   2015-02-18 15:16:20.188666018 +0100
275+++ src/com/kitfox/svg/SVGLoader.java   2015-02-18 15:25:38.763435836 +0100
[7676]276@@ -42,7 +42,6 @@
277 import org.xml.sax.*;
278 import org.xml.sax.helpers.DefaultHandler;
279 
280-import com.kitfox.svg.animation.*;
281 import java.util.logging.Level;
282 import java.util.logging.Logger;
283 
284@@ -88,10 +87,6 @@
285 
286         //Compile a list of important builder classes
287         nodeClasses.put("a", A.class);
288-        nodeClasses.put("animate", Animate.class);
289-        nodeClasses.put("animatecolor", AnimateColor.class);
290-        nodeClasses.put("animatemotion", AnimateMotion.class);
291-        nodeClasses.put("animatetransform", AnimateTransform.class);
292         nodeClasses.put("circle", Circle.class);
293         nodeClasses.put("clippath", ClipPath.class);
294         nodeClasses.put("defs", Defs.class);
295@@ -115,7 +110,6 @@
296         nodeClasses.put("polyline", Polyline.class);
297         nodeClasses.put("radialgradient", RadialGradient.class);
298         nodeClasses.put("rect", Rect.class);
299-        nodeClasses.put("set", SetSmil.class);
300         nodeClasses.put("shape", ShapeElement.class);
301         nodeClasses.put("stop", Stop.class);
302         nodeClasses.put("style", Style.class);
Note: See TracBrowser for help on using the repository browser.