| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!-- |
| 3 |
|
| 4 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 |
contributor license agreements. See the NOTICE file distributed with |
| 6 |
this work for additional information regarding copyright ownership. |
| 7 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 |
(the "License"); you may not use this file except in compliance with |
| 9 |
the License. You may obtain a copy of the License at |
| 10 |
|
| 11 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
|
| 13 |
Unless required by applicable law or agreed to in writing, software |
| 14 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 15 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 |
See the License for the specific language governing permissions and |
| 17 |
limitations under the License. |
| 18 |
|
| 19 |
--> |
| 20 |
<!-- ====================================================================== --> |
| 21 |
<!-- Courtesy of Max Froumentin. This document can be processed directly by --> |
| 22 |
<!-- the Squiggle browser. This file as an empty xsl stylesheet, which --> |
| 23 |
<!-- means that it applies to itself (no data). --> |
| 24 |
<!-- --> |
| 25 |
<!-- @author [email protected] --> |
| 26 |
<!-- @version $Id$ --> |
| 27 |
<!-- ====================================================================== --> |
| 28 |
<?xml-stylesheet href="" type="text/xsl"?> |
| 29 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 30 |
xmlns="http://www.w3.org/2000/svg" |
| 31 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 32 |
version="1.0"> |
| 33 |
|
| 34 |
<xsl:template match="/"> |
| 35 |
<svg viewBox="-40 -40 80 80" width="1024" height="768" preserveAspectRatio="xMidYMid slice"> |
| 36 |
<defs> |
| 37 |
<linearGradient id="gradient" gradientUnits="userSpaceOnUse" |
| 38 |
x1="-100" y1="-100" x2="100" y2="100"> |
| 39 |
<stop offset="0" stop-color="crimson"/> |
| 40 |
<stop offset="0.8" stop-color="gold"/> |
| 41 |
<stop offset="1" stop-color="yellow" /> |
| 42 |
</linearGradient> |
| 43 |
|
| 44 |
<linearGradient id="strokeGradient" gradientUnits="userSpaceOnUse" |
| 45 |
x1="100" y1="100" x2="-100" y2="-100"> |
| 46 |
<stop offset=".2" stop-color="gold"/> |
| 47 |
<stop offset="1" stop-color="rgb(128,0,0)" /> |
| 48 |
</linearGradient> |
| 49 |
</defs> |
| 50 |
|
| 51 |
<g id="spiral"> |
| 52 |
<xsl:call-template name="draw-primitive"> |
| 53 |
<xsl:with-param name="depth" select="40"/> |
| 54 |
</xsl:call-template> |
| 55 |
</g> |
| 56 |
</svg> |
| 57 |
</xsl:template> |
| 58 |
|
| 59 |
<xsl:template name="draw-primitive"> |
| 60 |
<xsl:param name="depth" select="0"/> |
| 61 |
<xsl:if test="$depth > 0"> |
| 62 |
<g transform="scale(.8, .8) rotate(10)"> |
| 63 |
<rect x="-100" y="-100" width="200" height="200" fill="url(#gradient)" stroke="none" stroke-width="5"/> |
| 64 |
<xsl:call-template name="draw-primitive"> |
| 65 |
<xsl:with-param name="depth" select="$depth - 1"/> |
| 66 |
</xsl:call-template> |
| 67 |
</g> |
| 68 |
</xsl:if> |
| 69 |
</xsl:template> |
| 70 |
</xsl:stylesheet> |