example: gradtransf.svg
authorMira Grudzinska <m.grudzinska@samsung.com>
Tue, 26 Oct 2021 00:13:57 +0000 (02:13 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 27 Oct 2021 06:15:29 +0000 (15:15 +0900)
The file enables to check the correctness of the gradient transformations
and units.
Removed duplicate file.

src/examples/images/gradtransf.svg [new file with mode: 0644]
src/examples/images/gradtransf.tvg [new file with mode: 0644]
src/examples/images/ietf.svg.tvg [deleted file]

diff --git a/src/examples/images/gradtransf.svg b/src/examples/images/gradtransf.svg
new file mode 100644 (file)
index 0000000..4efc1b8
--- /dev/null
@@ -0,0 +1,64 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="30 50 180 180">
+  <defs>
+<!-- LINEAR GRAD -->
+<!-- Object bbox -->
+    <linearGradient id="linearGradient1" x1="10%" y1="10%" x2="25%" y2="5%" gradientUnits="objectBoundingBox" spreadMethod="reflect" gradientTransform="matrix(4, 0, 0, 0.5, 0, 0)">
+      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
+    </linearGradient>
+
+    <linearGradient id="linearGradient2" x1="0.1" y1="0.1" x2="0.25" y2="0.05" gradientUnits="objectBoundingBox" spreadMethod="reflect" gradientTransform="matrix(0.5, 0, 0, 4, 0, 0)">
+      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
+    </linearGradient>
+
+<!-- User space -->
+    <linearGradient id="linearGradient3" x1="4%" y1="4%" x2="10%" y2="15%" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(4, 1, 0.2, 0.5, 0, 0)">
+      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
+    </linearGradient>
+
+    <linearGradient id="linearGradient4" x1="7" y1="7" x2="10" y2="40" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(4, 3, 0, 0.5, 0, 0)">
+      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
+    </linearGradient>
+
+<!-- RADIAL GRAD -->
+<!-- Object bbox -->
+    <radialGradient id="radialGradient1" r="10%" cx="100%" cy="50%" gradientUnits="objectBoundingBox" spreadMethod="reflect" gradientTransform="matrix(5.4, 1.1, 1, 0.5, 0, 0.3)">
+      <stop style="stop-color:#ff00ff;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#00ff00;stop-opacity:1;" offset="1"/>
+    </radialGradient>
+
+    <radialGradient id="radialGradient2" r="0.1" cx="1" cy="0.5" gradientUnits="objectBoundingBox" spreadMethod="reflect" gradientTransform="matrix(0.5, -0.3, -0.3, 4, 0, 0)">
+      <stop style="stop-color:#ff00ff;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#00ff00;stop-opacity:1;" offset="1"/>
+    </radialGradient>
+
+<!-- User space -->
+    <radialGradient id="radialGradient3" r="7%" cx="10%" cy="150%" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(4, 0.4, 0.9, 0.5, 0, -10)">
+      <stop style="stop-color:#ff00ff;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#00ff00;stop-opacity:1;" offset="1"/>
+    </radialGradient>
+
+    <radialGradient id="radialGradient4" r="20" cx="20" cy="350" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(5, 1.1, 0, 0.5, 0, -60)">
+      <stop style="stop-color:#ff00ff;stop-opacity:1;" offset="0"/>
+      <stop style="stop-color:#00ff00;stop-opacity:1;" offset="1"/>
+    </radialGradient>
+  </defs>
+
+  <g transform="matrix(0.9, -0.25, -0.1, 0.8, -12, 80)">
+    <g transform="translate(20, -5) scale(0.5, 1)">
+      <rect x="50" y="0" width="100" height="50" fill="url(#linearGradient1)" transform="matrix(0.5, 1, 1.4, 1.4, 0, -100)"/>
+      <rect x="200" y="0" width="100" height="60" fill="url(#linearGradient2)" transform="matrix(1.1, 0.2, 0.4, 1, -110, -20)"/>
+      <rect x="50" y="150" width="100" height="70" fill="url(#linearGradient3)" transform="matrix(0.9, 1.1, 1.4, 0.8, -100, -90)"/>
+      <rect x="200" y="150" width="100" height="70" fill="url(#linearGradient4)" transform="matrix(0.6, -0.1, -0.1, 1.3, 0, -60)"/>
+    </g>
+    <g transform="translate(120, 70) scale(0.5, 0.8) rotate(-25)">
+      <circle cx="50" cy="50" r="80" fill="url(#radialGradient1)" transform="matrix(0.5, -0.1, -0.1, 0.9, 50, 30)"/>
+      <circle cx="200" cy="50" r="50" fill="url(#radialGradient2)" transform="matrix(0.6, -0.1, 0.1, 1.3, 20, 50)"/>
+      <circle cx="50" cy="150" r="70" fill="url(#radialGradient3)" transform="matrix(0.8, 0.1, 0.1, 0.6, 30, 100)"/>
+      <circle cx="200" cy="150" r="70" fill="url(#radialGradient4)" transform="matrix(0.5, -0.3, 0.3, 0.5, 50, 160)"/>
+    </g>
+  </g>
+</svg>
diff --git a/src/examples/images/gradtransf.tvg b/src/examples/images/gradtransf.tvg
new file mode 100644 (file)
index 0000000..3418b53
Binary files /dev/null and b/src/examples/images/gradtransf.tvg differ
diff --git a/src/examples/images/ietf.svg.tvg b/src/examples/images/ietf.svg.tvg
deleted file mode 100644 (file)
index dc7c1f3..0000000
Binary files a/src/examples/images/ietf.svg.tvg and /dev/null differ