[lasem] [tests] New filter sample files.



commit 22a9d99cc2b9d1aa95357af6ec39b11806e39803
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date:   Tue Jul 7 22:42:26 2009 +0200

    [tests] New filter sample files.

 test/svg/misc/filters00.svg |   53 +++++++++++++++++++++++++++++++++++++++++++
 test/svg/misc/filters01.svg |   43 ++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 0 deletions(-)
---
diff --git a/test/svg/misc/filters00.svg b/test/svg/misc/filters00.svg
new file mode 100644
index 0000000..138c4f2
--- /dev/null
+++ b/test/svg/misc/filters00.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+              "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg width="11.3cm" height="2.2cm" viewBox="0 0 1130 220" version="1.1"
+     xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>
+  <title>Example filters00.svg - filter effects before and after</title>
+  <desc>Picture of the before and after affects of filtering.</desc>
+	<defs>
+    <filter id="MyFilter">
+			<feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
+			<feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+			<feSpecularLighting in="blur" surfaceScale="5" specularConstant="1" 
+                          specularExponent="10" lighting-color="white"  
+                          result="specOut">
+				<fePointLight x="-5000" y="-10000" z="20000"/>
+			</feSpecularLighting>
+			<feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
+			<feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" 
+                   k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
+			<feMerge>
+				<feMergeNode in="offsetBlur"/>
+				<feMergeNode in="litPaint"/>
+			</feMerge>
+		</filter>
+    <g id="CircleRectTriangle">
+      <g>
+        <circle cx="85" cy="80" r="40" fill="yellow"  />
+<g>
+        <rect x="145" y="45" width="90" height="70" fill="red"  />
+</g>
+        <path d="M260,40 L335,80 L260,120 z" fill="#4444ff"  />
+      </g>
+    </g>
+    <path id="LineWithArrow" 
+          d="M0,-15 h80 v-10 l40,25 l-40,25 v-10 h-80 z" />
+	</defs>
+  <g font-family="Verdana" font-size="30" >
+    <rect x="1" y="1" width="1128" height="218" 
+          fill="#cccccc" stroke="blue" />
+    <use x="0" y="0" xlink:href="#CircleRectTriangle"/>
+    <text x="20" y="180">Original source graphic</text>
+    <use x="380" y="80" xlink:href="#LineWithArrow"/>
+    <text x="520" y="70">Filter</text>
+    <text x="520" y="120">Effect</text>
+    <use x="630" y="80" xlink:href="#LineWithArrow"/>
+    <text x="790" y="180">Result of filter effect</text>
+  </g>
+  <g filter="url(#MyFilter)" >
+    <use x="750" y="0" xlink:href="#CircleRectTriangle"/>
+  </g>
+</svg>
+
+
diff --git a/test/svg/misc/filters01.svg b/test/svg/misc/filters01.svg
new file mode 100644
index 0000000..a9365b4
--- /dev/null
+++ b/test/svg/misc/filters01.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+              "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg width="7.5cm" height="5cm" viewBox="0 0 200 120"
+     xmlns="http://www.w3.org/2000/svg"; version="1.1">
+  <title>Example filters01.svg - introducing filter effects</title>
+  <desc>An example which combines multiple filter primitives
+        to produce a 3D lighting effect on a graphic consisting
+        of the string "SVG" sitting on top of oval filled in red
+        and surrounded by an oval outlined in red.</desc>
+  <defs>
+    <filter id="MyFilter" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="120">
+      <feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
+      <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+      <feSpecularLighting in="blur" surfaceScale="5" specularConstant=".75" 
+                          specularExponent="20" lighting-color="#bbbbbb"  
+                          result="specOut">
+        <fePointLight x="-5000" y="-10000" z="20000"/>
+      </feSpecularLighting>
+      <feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
+      <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" 
+                   k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
+      <feMerge>
+        <feMergeNode in="offsetBlur"/>
+        <feMergeNode in="litPaint"/>
+      </feMerge>
+    </filter>
+  </defs>
+  <rect x="1" y="1" width="198" height="118" fill="#888888" stroke="blue" />
+  <g filter="url(#MyFilter)" >
+	  <g>
+      <path fill="none" stroke="#D90000" stroke-width="10" 
+            d="M50,90 C0,90 0,30 50,30 L150,30 C200,30 200,90 150,90 z" />
+      <path fill="#D90000" 
+            d="M60,80 C30,80 30,40 60,40 L140,40 C170,40 170,80 140,80 z" />
+      <g fill="#FFFFFF" stroke="black" font-size="45" font-family="Verdana" >
+        <text x="52" y="76">SVG</text>
+      </g>
+    </g>
+  </g>
+</svg>
+
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]