summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-17 14:46:20 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-17 14:46:20 +0000
commita4c8b296b04ffcb728e75f465872cfd42aef787e (patch)
tree139168352b7852adff3237e9323246e0603ff81d /share/extensions
parentFix gtk3 build (diff)
parentSimilar workaround to r13523 (text&font dialog not appearing quickly) (diff)
downloadinkscape-a4c8b296b04ffcb728e75f465872cfd42aef787e.tar.gz
inkscape-a4c8b296b04ffcb728e75f465872cfd42aef787e.zip
Update to trunk r13525
(bzr r13341.1.142)
Diffstat (limited to 'share/extensions')
-rw-r--r--share/extensions/svg2xaml.inx1
-rwxr-xr-xshare/extensions/svg2xaml.xsl33
2 files changed, 19 insertions, 15 deletions
diff --git a/share/extensions/svg2xaml.inx b/share/extensions/svg2xaml.inx
index da621b8f7..74b8f731a 100644
--- a/share/extensions/svg2xaml.inx
+++ b/share/extensions/svg2xaml.inx
@@ -2,6 +2,7 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<_name>XAML Output</_name>
<id>org.inkscape.output.xaml</id>
+ <param name="silverlight" type="boolean" _gui-text="Silverlight compatible XAML">false</param>
<output>
<extension>.xaml</extension>
<mimetype>text/xml+xaml</mimetype>
diff --git a/share/extensions/svg2xaml.xsl b/share/extensions/svg2xaml.xsl
index 40b1f400b..040e6bcb2 100755
--- a/share/extensions/svg2xaml.xsl
+++ b/share/extensions/svg2xaml.xsl
@@ -3,7 +3,7 @@
<!--
Copyright (c) 2005-2007 authors:
Original version: Toine de Greef (a.degreef@chello.nl)
-Modified (2010-2011) by Nicolas Dufour (nicoduf@yahoo.fr) (blur support, units
+Modified (2010-2014) by Nicolas Dufour (nicoduf@yahoo.fr) (blur support, units
convertion, comments, and some other fixes)
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,7 +39,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:strip-space elements="*" />
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
-<xsl:param name="silverlight_compatible" select="2" />
+<xsl:param name="silverlight_compatible" select="$silverlight" />
<!--
// Containers //
@@ -53,10 +53,16 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
-->
<xsl:template match="/">
<xsl:choose>
- <xsl:when test="$silverlight_compatible = 1">
+ <xsl:when test="$silverlight_compatible = 'true'">
+ <xsl:comment>
+ <xsl:value-of select="'This file is compatible with Silverlight'" />
+ </xsl:comment>
<xsl:apply-templates mode="forward" />
</xsl:when>
<xsl:otherwise>
+ <xsl:comment>
+ <xsl:value-of select="'This file is NOT compatible with Silverlight'" />
+ </xsl:comment>
<Viewbox Stretch="Uniform">
<xsl:apply-templates mode="forward" />
</Viewbox>
@@ -837,7 +843,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<!--
// Unit to pixel converter //
- Values with units (except %) are converted to pixels and rounded.
+ Values with units (except %) are converted to pixels.
Unknown units are kept.
em, ex and % not implemented
-->
@@ -845,28 +851,25 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:param name="convert_value" />
<xsl:choose>
<xsl:when test="contains($convert_value, 'px')">
- <xsl:value-of select="round(translate($convert_value, 'px', ''))" />
+ <xsl:value-of select="translate($convert_value, 'px', '')" />
</xsl:when>
<xsl:when test="contains($convert_value, 'pt')">
- <xsl:value-of select="round(translate($convert_value, 'pt', '') * 1.25)" />
+ <xsl:value-of select="translate($convert_value, 'pt', '') * 1.25" />
</xsl:when>
<xsl:when test="contains($convert_value, 'pc')">
- <xsl:value-of select="round(translate($convert_value, 'pc', '') * 15)" />
+ <xsl:value-of select="translate($convert_value, 'pc', '') * 15" />
</xsl:when>
<xsl:when test="contains($convert_value, 'mm')">
- <xsl:value-of select="round(translate($convert_value, 'mm', '') * 3.543307)" />
+ <xsl:value-of select="translate($convert_value, 'mm', '') * 3.543307" />
</xsl:when>
<xsl:when test="contains($convert_value, 'cm')">
- <xsl:value-of select="round(translate($convert_value, 'cm', '') * 35.43307)" />
+ <xsl:value-of select="translate($convert_value, 'cm', '') * 35.43307" />
</xsl:when>
<xsl:when test="contains($convert_value, 'in')">
- <xsl:value-of select="round(translate($convert_value, 'in', '') * 90)" />
+ <xsl:value-of select="translate($convert_value, 'in', '') * 90" />
</xsl:when>
<xsl:when test="contains($convert_value, 'ft')">
- <xsl:value-of select="round(translate($convert_value, 'ft', '') * 1080)" />
- </xsl:when>
- <xsl:when test="not(string(number($convert_value))='NaN')">
- <xsl:value-of select="round($convert_value)" />
+ <xsl:value-of select="translate($convert_value, 'ft', '') * 1080" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$convert_value" />
@@ -2650,7 +2653,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:if test="@d">
<xsl:choose>
- <xsl:when test="$silverlight_compatible = 1">
+ <xsl:when test="$silverlight_compatible = 'true'">
<xsl:attribute name="Data">
<xsl:value-of select="translate(@d , ',', ' ')" />
</xsl:attribute>