Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/diagram-definition/org.eclipse.papyrus.dd.editor/batik-1.7/samples/tests/spec/scripting/paintType.svg')
-rw-r--r--extraplugins/diagram-definition/org.eclipse.papyrus.dd.editor/batik-1.7/samples/tests/spec/scripting/paintType.svg142
1 files changed, 142 insertions, 0 deletions
diff --git a/extraplugins/diagram-definition/org.eclipse.papyrus.dd.editor/batik-1.7/samples/tests/spec/scripting/paintType.svg b/extraplugins/diagram-definition/org.eclipse.papyrus.dd.editor/batik-1.7/samples/tests/spec/scripting/paintType.svg
new file mode 100644
index 00000000000..ad3ef811756
--- /dev/null
+++ b/extraplugins/diagram-definition/org.eclipse.papyrus.dd.editor/batik-1.7/samples/tests/spec/scripting/paintType.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- ====================================================================== -->
+<!-- Test of paintType DOM interface -->
+<!-- -->
+<!-- @author deweese@apache.org -->
+<!-- @version $Id: paintType.svg 475477 2006-11-15 22:44:28Z cam $ -->
+<!-- ====================================================================== -->
+
+<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
+
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+ onload="doTest()"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <title>Test of paintType DOM interface</title>
+
+ <text x="50%" y="45" class="title">Test of paintType DOM interface</text>
+
+ <script type="text/ecmascript">
+ var svgNamespaceURI = "http://www.w3.org/2000/svg";
+ var UNKNOWN = 0;
+ var RGBCOLOR = 1;
+ var RGBCOLOR_ICCCOLOR = 2;
+ var NONE = 101;
+ var CURRENTCOLOR = 102;
+ var URI_NONE = 103;
+ var URI_CURRENTCOLOR = 104;
+ var URI_RGBCOLOR = 105;
+ var URI_RGBCOLOR_ICCCOLOR = 106;
+ var URI = 107;
+
+ function getType(id, attr) {
+ var e = document.getElementById(id);
+ var pa = e.getPresentationAttribute(attr);
+ var pt = pa.paintType;
+ var txt;
+ if (pt == UNKNOWN) txt="UNKNOWN";
+ else if (pt == RGBCOLOR) txt="RGBCOLOR";
+ else if (pt == RGBCOLOR_ICCCOLOR) txt="RGBCOLOR_ICCCOLOR";
+ else if (pt == NONE) txt="NONE";
+ else if (pt == CURRENTCOLOR) txt="CURRENTCOLOR";
+ else if (pt == URI_NONE) txt="URI_NONE";
+ else if (pt == URI_CURRENTCOLOR) txt="URI_CURRENTCOLOR";
+ else if (pt == URI_RGBCOLOR) txt="URI_RGBCOLOR";
+ else if (pt == URI_RGBCOLOR_ICCCOLOR) txt="URI_RGBCOLOR_ICCCOLOR";
+ else if (pt == URI) txt="URI";
+ else txt="Unknown paint type";
+
+ e = document.getElementById("text."+id);
+ e.appendChild(document.createTextNode(txt));
+ }
+
+ function doTest() {
+ getType("r1", "fill");
+ getType("r2", "fill");
+ getType("r3", "fill");
+ getType("r4", "fill");
+ getType("r5", "fill");
+ getType("r6", "fill");
+ getType("r7", "fill");
+ getType("r8", "fill");
+ getType("r9", "fill");
+ getType("r10", "fill");
+ getType("r11", "fill");
+ getType("r12", "fill");
+ }
+ </script>
+
+ <linearGradient id="lg" spreadMethod="repeat">
+ <stop offset="0" stop-color="gold" />
+ <stop offset="1" stop-color="crimson" />
+ </linearGradient>
+
+ <color-profile name="changeColorAuto"
+ rendering-intent="auto"
+ xlink:href="../../resources/icc/changeColor.icm"/>
+
+ <g color="green" text-anchor="middle">
+ <rect id="r1" x="30" y="80" height="75" width="75" fill="#F00"/>
+ <rect id="r2" x="135" y="80" height="75" width="75" fill="gold"/>
+ <rect id="r3" x="240" y="80" height="75" width="75" fill="currentColor"/>
+ <rect id="r4" x="345" y="80" height="75" width="75" fill="url(#lg)"/>
+
+ <text id="text.r1" x="67.5" y="170"/>
+ <text id="text.r2" x="172.5" y="185"/>
+ <text id="text.r3" x="277.5" y="170"/>
+ <text id="text.r4" x="382.5" y="185"/>
+
+
+ <rect id="r5" x="30" y="195" height="75" width="75"
+ fill="none" stroke="black"/>
+ <rect id="r6" x="135" y="195" height="75" width="75"
+ fill="gold icc-color(changeColorAuto, 0.702, 0.2745, 0.098)"/>
+ <rect id="r7" x="240" y="195" height="75" width="75"
+ fill="url(#lg) none"/>
+ <rect id="r8" x="345" y="195" height="75" width="75"
+ fill="url(#lg) gold"/>
+
+ <text id="text.r5" x="67.5" y="290"/>
+ <text id="text.r6" x="172.5" y="305"/>
+ <text id="text.r7" x="277.5" y="290"/>
+ <text id="text.r8" x="382.5" y="305"/>
+
+
+ <rect id="r9" x="30" y="320" height="75" width="75"
+ fill="url(#lg) currentColor"/>
+ <rect id="r10" x="135" y="320" height="75" width="75"
+ fill="url(#lg) gold icc-color(changeColorAuto, 0.702, 0.2745, 0.098)"/>
+ <rect id="r11" x="240" y="320" height="75" width="75"
+ fill="url(#no_such_uri) gold"/>
+ <rect id="r12" x="345" y="320" height="75" width="75"
+ fill="url(#no_such_uri) currentColor"/>
+
+ <text id="text.r9" x="67.5" y="415"/>
+ <text id="text.r10" x="172.5" y="430"/>
+ <text id="text.r11" x="277.5" y="415"/>
+ <text id="text.r12" x="382.5" y="430"/>
+
+ </g>
+</svg> \ No newline at end of file

Back to the top