division ....
This commit is contained in:
parent
34bc66cb4d
commit
24d5a33b0e
1 changed files with 7 additions and 5 deletions
10
svg.xsl
10
svg.xsl
|
@ -19,10 +19,12 @@
|
|||
|
||||
<xsl:variable name="scale">
|
||||
<!-- Valeurs trouvés au fils de plusieurs tests -->
|
||||
<xsl:variable name="dividende"
|
||||
select="1.4" />
|
||||
<xsl:variable name="x"
|
||||
select="$width div max(LINETO/@x) div 1.4" />
|
||||
select="$width div max(*/@x) div $dividende" />
|
||||
<xsl:variable name="y"
|
||||
select="$height div max(LINETO/@y) div 1.4" />
|
||||
select="$height div max(*/@y) div $dividende" />
|
||||
|
||||
<!-- La plus petite valeur entre X et Y -->
|
||||
<xsl:choose>
|
||||
|
@ -38,9 +40,9 @@
|
|||
|
||||
<!-- Translation pour être à peu près centré -->
|
||||
<xsl:variable
|
||||
name="transX" select="($width * 1.2) - max(LINETO/@x) * $scale" />
|
||||
name="transX" select="($width * 1.2) - max(*/@x ) * $scale" />
|
||||
<xsl:variable
|
||||
name="transY" select="$height - max(LINETO/@y) * $scale" />
|
||||
name="transY" select="$height - max(*/@y) * $scale" />
|
||||
|
||||
<g stroke="black"
|
||||
stroke-width="{1 div $scale}"
|
||||
|
|
Reference in a new issue