[lasem] [SVG] One more sample file.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: svn-commits-list gnome org
- Subject: [lasem] [SVG] One more sample file.
- Date: Sat, 25 Apr 2009 12:44:30 -0400 (EDT)
commit fdb4f902f20db02b584ca2f3c9049f1c854a3638
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date: Sat Apr 25 18:44:04 2009 +0200
[SVG] One more sample file.
---
test/svg/misc/enable-background.svg | 83 +++++++++++++++++++++++++++++++++++
1 files changed, 83 insertions(+), 0 deletions(-)
diff --git a/test/svg/misc/enable-background.svg b/test/svg/misc/enable-background.svg
new file mode 100644
index 0000000..ea88aaf
--- /dev/null
+++ b/test/svg/misc/enable-background.svg
@@ -0,0 +1,83 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="13.5cm" height="2.7cm" viewBox="0 0 1350 270"
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <title>Example enable-background01</title>
+ <desc>This test case shows five pictures which illustrate the rules
+ for background image processing.</desc>
+ <defs>
+ <filter id="ShiftBGAndBlur"
+ filterUnits="userSpaceOnUse" x="0" y="0" width="1200" height="400">
+ <desc>
+ This filter discards the SourceGraphic, if any, and just produces
+ a result consisting of the BackgroundImage shifted down 125 units
+ and then blurred.
+ </desc>
+ <feOffset in="BackgroundImage" dx="0" dy="125" />
+ <feGaussianBlur stdDeviation="8" />
+ </filter>
+ <filter id="ShiftBGAndBlur_WithSourceGraphic"
+ filterUnits="userSpaceOnUse" x="0" y="0" width="1200" height="400">
+ <desc>
+ This filter takes the BackgroundImage, shifts it down 125 units, blurs it,
+ and then renders the SourceGraphic on top of the shifted/blurred background.
+ </desc>
+ <feOffset in="BackgroundImage" dx="0" dy="125" />
+ <feGaussianBlur stdDeviation="8" result="blur" />
+ <feMerge>
+ <feMergeNode in="blur"/>
+ <feMergeNode in="SourceGraphic"/>
+ </feMerge>
+ </filter>
+ </defs>
+ <g transform="translate(0,0)">
+ <desc>The first picture is our reference graphic without filters.</desc>
+ <rect x="25" y="25" width="100" height="100" fill="red"/>
+ <g opacity=".5">
+ <circle cx="125" cy="75" r="45" fill="green"/>
+ <polygon points="160,25 160,125 240,75" fill="blue"/>
+ </g>
+ <rect x="5" y="5" width="260" height="260" fill="none" stroke="blue"/>
+ </g>
+ <g enable-background="new" transform="translate(270,0)">
+ <desc>The second adds an empty 'g' element which invokes ShiftBGAndBlur.</desc>
+ <rect x="25" y="25" width="100" height="100" fill="red"/>
+ <g opacity=".5">
+ <circle cx="125" cy="75" r="45" fill="green"/>
+ <polygon points="160,25 160,125 240,75" fill="blue"/>
+ </g>
+ <g filter="url(#ShiftBGAndBlur)"/>
+ <rect x="5" y="5" width="260" height="260" fill="none" stroke="blue"/>
+ </g>
+ <g enable-background="new" transform="translate(540,0)">
+ <desc>The third invokes ShiftBGAndBlur on the inner group.</desc>
+ <rect x="25" y="25" width="100" height="100" fill="red"/>
+ <g filter="url(#ShiftBGAndBlur)" opacity=".5">
+ <circle cx="125" cy="75" r="45" fill="green"/>
+ <polygon points="160,25 160,125 240,75" fill="blue"/>
+ </g>
+ <rect x="5" y="5" width="260" height="260" fill="none" stroke="blue"/>
+ </g>
+ <g enable-background="new" transform="translate(810,0)">
+ <desc>The fourth invokes ShiftBGAndBlur on the triangle.</desc>
+ <rect x="25" y="25" width="100" height="100" fill="red"/>
+ <g opacity=".5">
+ <circle cx="125" cy="75" r="45" fill="green"/>
+ <polygon points="160,25 160,125 240,75" fill="blue"
+ filter="url(#ShiftBGAndBlur)"/>
+ </g>
+ <rect x="5" y="5" width="260" height="260" fill="none" stroke="blue"/>
+ </g>
+ <g enable-background="new" transform="translate(1080,0)">
+ <desc>The fifth invokes ShiftBGAndBlur_WithSourceGraphic on the triangle.</desc>
+ <rect x="25" y="25" width="100" height="100" fill="red"/>
+ <g opacity=".5">
+ <circle cx="125" cy="75" r="45" fill="green"/>
+ <polygon points="160,25 160,125 240,75" fill="blue"
+ filter="url(#ShiftBGAndBlur_WithSourceGraphic)"/>
+ </g>
+ <rect x="5" y="5" width="260" height="260" fill="none" stroke="blue"/>
+ </g>
+</svg>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]