fmt
This commit is contained in:
parent
1dec319eb4
commit
4e1ab8bbea
1 changed files with 17 additions and 12 deletions
27
svg.xsl
27
svg.xsl
|
@ -27,8 +27,10 @@
|
|||
<xsl:with-param name="minX" select="$minX" />
|
||||
<xsl:with-param name="minY" select="$minY" />
|
||||
<xsl:with-param name="strokeWidth">
|
||||
<!-- On prend le plus grand côté qu'on divise -->
|
||||
<!-- On prend le plus grand côté qu'on divise
|
||||
avec `d` une valeur arbitraire qui rend bien -->
|
||||
<xsl:variable name="d" select="1000" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$width > $height">
|
||||
<xsl:value-of select="$width div $d" />
|
||||
|
@ -44,10 +46,12 @@
|
|||
|
||||
<!-- Template pour le traceur -->
|
||||
<xsl:template match="traceur">
|
||||
<!-- Dimensions et largeur de trait -->
|
||||
<xsl:param name="minX" />
|
||||
<xsl:param name="minY" />
|
||||
<xsl:param name="strokeWidth" />
|
||||
<xsl:param
|
||||
name="minX" />
|
||||
<xsl:param
|
||||
name="minY" />
|
||||
<xsl:param
|
||||
name="strokeWidth" />
|
||||
|
||||
<!-- Décalage -->
|
||||
<xsl:variable
|
||||
|
@ -84,13 +88,14 @@
|
|||
<xsl:template name="generatePath">
|
||||
<xsl:param name="idx"
|
||||
select="1" />
|
||||
<xsl:param name="x" select="0" />
|
||||
<xsl:param name="y" select="0" />
|
||||
<xsl:param name="x"
|
||||
select="0" />
|
||||
<xsl:param name="y"
|
||||
select="0" />
|
||||
|
||||
<xsl:if
|
||||
test="count(*) >= $idx">
|
||||
<xsl:variable
|
||||
name="action" select="*[position() = $idx]" />
|
||||
<xsl:if test="count(*) >= $idx">
|
||||
<xsl:variable name="action"
|
||||
select="*[position() = $idx]" />
|
||||
|
||||
<xsl:choose>
|
||||
<!-- Déplacement -->
|
||||
|
|
Reference in a new issue