summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2007-04-13 03:53:19 +0200
committerkitfox2007-04-13 03:53:19 +0200
commit079568c09cfe6974c0fc89f285191b9a2eb69a54 (patch)
treee3e22a8ead4fc9742df0904935c1737737c7bd58
parentAdded path definitions. (diff)
downloadsvg-salamander-core-079568c09cfe6974c0fc89f285191b9a2eb69a54.tar.gz
svg-salamander-core-079568c09cfe6974c0fc89f285191b9a2eb69a54.tar.xz
svg-salamander-core-079568c09cfe6974c0fc89f285191b9a2eb69a54.zip
Added basic shapes.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@16 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGAnimatedPoints.java31
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGCircleElement.java41
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGEllipseElement.java45
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGLineElement.java45
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGPolygonElement.java29
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGPolylineElement.java29
-rw-r--r--src/main/java/com/kitfox/salamander/svg/shape/SVGRectElement.java53
7 files changed, 273 insertions, 0 deletions
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGAnimatedPoints.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGAnimatedPoints.java
new file mode 100644
index 0000000..7d04a7e
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGAnimatedPoints.java
@@ -0,0 +1,31 @@
+/*
+ * SVGAnimatedPoints.java
+ *
+ * Created on April 12, 2007, 9:49 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.coordSystems.SVGPointList;
+
+/**
+ *
+ * The SVGAnimatedPoints interface supports elements which have a 'points' attribute which holds a list of coordinate values and which support the ability to animate that attribute.
+ *
+ * Additionally, the 'points' attribute on the original element accessed via the XML DOM (e.g., using the getAttribute() method call) will reflect any changes made to points.
+ * @author kitfox
+ */
+public interface SVGAnimatedPoints
+{
+ /**
+ * Provides access to the base (i.e., static) contents of the points attribute.
+ */
+ public SVGPointList getPoints();
+ /**
+ * Provides access to the current animated contents of the points attribute. If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'points'.
+ */
+ public SVGPointList getAnimatedPoints();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGCircleElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGCircleElement.java
new file mode 100644
index 0000000..97d3cb8
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGCircleElement.java
@@ -0,0 +1,41 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGCircleElement interface corresponds to the 'circle' element.
+ * @author kitfox
+ */
+public interface SVGCircleElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+ /**
+ * Corresponds to attribute cx on the given 'circle' element.
+ */
+ public SVGAnimatedLength getCx();
+ /**
+ * Corresponds to attribute cy on the given 'circle' element.
+ */
+ public SVGAnimatedLength getCy();
+ /**
+ * Corresponds to attribute r on the given 'circle' element.
+ */
+ public SVGAnimatedLength getX();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGEllipseElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGEllipseElement.java
new file mode 100644
index 0000000..7b9f862
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGEllipseElement.java
@@ -0,0 +1,45 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGEllipseElement interface corresponds to the 'ellipse' element.
+ * @author kitfox
+ */
+public interface SVGEllipseElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+ /**
+ * Corresponds to attribute cx on the given 'ellipse' element.
+ */
+ public SVGAnimatedLength getCx();
+ /**
+ * Corresponds to attribute cy on the given 'ellipse' element.
+ */
+ public SVGAnimatedLength getCy();
+ /**
+ * Corresponds to attribute rx on the given 'ellipse' element.
+ */
+ public SVGAnimatedLength getRx();
+ /**
+ * Corresponds to attribute ry on the given 'ellipse' element.
+ */
+ public SVGAnimatedLength getRy();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGLineElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGLineElement.java
new file mode 100644
index 0000000..634b7be
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGLineElement.java
@@ -0,0 +1,45 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGLineElement interface corresponds to the 'line' element.
+ * @author kitfox
+ */
+public interface SVGLineElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+ /**
+ * Corresponds to attribute x1 on the given 'line' element.
+ */
+ public SVGAnimatedLength getX1();
+ /**
+ * Corresponds to attribute y1 on the given 'line' element.
+ */
+ public SVGAnimatedLength getY1();
+ /**
+ * Corresponds to attribute x2 on the given 'line' element.
+ */
+ public SVGAnimatedLength getX2();
+ /**
+ * Corresponds to attribute y2 on the given 'line' element.
+ */
+ public SVGAnimatedLength getY2();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGPolygonElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGPolygonElement.java
new file mode 100644
index 0000000..e7b0bda
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGPolygonElement.java
@@ -0,0 +1,29 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGPolygonElement interface corresponds to the 'polygon' element.
+ * @author kitfox
+ */
+public interface SVGPolygonElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget, SVGAnimatedPoints
+{
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGPolylineElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGPolylineElement.java
new file mode 100644
index 0000000..1a4f74d
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGPolylineElement.java
@@ -0,0 +1,29 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGPolylineElement interface corresponds to the 'polyline' element.
+ * @author kitfox
+ */
+public interface SVGPolylineElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget, SVGAnimatedPoints
+{
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/shape/SVGRectElement.java b/src/main/java/com/kitfox/salamander/svg/shape/SVGRectElement.java
new file mode 100644
index 0000000..7da3e44
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/shape/SVGRectElement.java
@@ -0,0 +1,53 @@
+/*
+ * SVGRectElement.java
+ *
+ * Created on April 12, 2007, 9:43 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.shape;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGRectElement interface corresponds to the 'rect' element.
+ * @author kitfox
+ */
+public interface SVGRectElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+ /**
+ * Corresponds to attribute x on the given 'rect' element.
+ */
+ public SVGAnimatedLength getX();
+ /**
+ * Corresponds to attribute y on the given 'rect' element.
+ */
+ public SVGAnimatedLength getY();
+ /**
+ * Corresponds to attribute width on the given 'rect' element.
+ */
+ public SVGAnimatedLength getWidth();
+ /**
+ * Corresponds to attribute height on the given 'rect' element.
+ */
+ public SVGAnimatedLength getHeight();
+ /**
+ * Corresponds to attribute rx on the given 'rect' element.
+ */
+ public SVGAnimatedLength getRx();
+ /**
+ * Corresponds to attribute ry on the given 'rect' element.
+ */
+ public SVGAnimatedLength getRy();
+}