summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d971153)
raw | patch | inline | side by side (parent: d971153)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Thu, 13 Sep 2007 04:56:25 +0000 (04:56 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Thu, 13 Sep 2007 04:56:25 +0000 (04:56 +0000) |
Update from Toine.
share/extensions/xaml2svg.xsl | patch | blob | history | |
share/extensions/xaml2svg/properties.xsl | patch | blob | history | |
share/extensions/xaml2svg/shapes.xsl | patch | blob | history |
index b0e7925f14493f78223ee4b601cf208e397b6306..c5f1cfd75f995a34ac3da230b45463b494937a5d 100644 (file)
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
THE SOFTWARE.\r
+\r
+Version history:\r
+\r
+20070907 Initial release\r
+20070912 Removed NaN as viewBox values\r
+\r
-->\r
\r
<xsl:stylesheet version="1.0"\r
<svg>\r
<xsl:attribute name="overflow">visible</xsl:attribute>\r
<xsl:variable name="viewBox"><xsl:apply-templates mode="boundingbox" /></xsl:variable>\r
- <xsl:if test="system-property('xsl:vendor') = 'Microsoft'">\r
+ <xsl:if test="system-property('xsl:vendor') = 'Microsoft' and (msxsl:node-set($viewBox)/boundingbox/@x1 != '') and (msxsl:node-set($viewBox)/boundingbox/@x2 != '') and (msxsl:node-set($viewBox)/boundingbox/@y1 != '') and (msxsl:node-set($viewBox)/boundingbox/@y2 != '')">\r
<xsl:attribute name="viewBox">\r
<xsl:value-of select="concat(msxsl:node-set($viewBox)/boundingbox/@x1, ' ')" />\r
<xsl:value-of select="concat(msxsl:node-set($viewBox)/boundingbox/@y1, ' ')" />\r
index e00011549896f6649ac5a0e7cbeebea0d91427da..dcb6111bdaf04bd772b15daf4ab9b9e4e12e6618 100644 (file)
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
THE SOFTWARE.\r
+\r
+Version history:\r
+\r
+20070907 Initial release\r
+20070912 TemplateBinding in template_color\r
+\r
-->\r
\r
<xsl:stylesheet version="1.0"\r
<xsl:value-of select="concat('#', substring($colorspec, string-length($colorspec) - 5, 3))" />\r
</xsl:when>\r
<xsl:when test="contains($colorspec, '{StaticResource ')"><xsl:value-of select="concat('url(#', substring-before(substring-after($colorspec, '{StaticResource '), '}'), ')')" /></xsl:when>\r
+ <xsl:when test="contains($colorspec, '{TemplateBinding ')"><xsl:value-of select="concat('url(#', substring-before(substring-after($colorspec, '{TemplateBinding '), '}'), ')')" /></xsl:when>\r
<xsl:otherwise><xsl:value-of select="$colorspec" /></xsl:otherwise>\r
</xsl:choose>\r
</xsl:template>\r
index 45510e33f9cb39a2b2615fdbd342bba9f34df940..db300154ebaa4d480615601c4b0d6843ac1fbb3a 100644 (file)
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
THE SOFTWARE.\r
+\r
+Version history:\r
+\r
+20070907 Initial release\r
+20070912 starts-with(@Data, 'F0 ') to strip of F0 from path data\r
+20070912 nonzero and evenodd were outside xsl:attribute (reported by bulia byak and Ted Gould)\r
+\r
-->\r
\r
<xsl:stylesheet version="1.0" \r
<xsl:if test="@Data">\r
<xsl:attribute name="d">\r
<xsl:choose>\r
+ <xsl:when test="starts-with(@Data, 'F0 ')"><xsl:value-of select="substring-after(@Data, 'F0 ')" /></xsl:when>\r
<xsl:when test="starts-with(@Data, 'F1 ')"><xsl:value-of select="substring-after(@Data, 'F1 ')" /></xsl:when>\r
<xsl:otherwise><xsl:value-of select="@Data" /></xsl:otherwise>\r
</xsl:choose>\r
</xsl:attribute>\r
</xsl:if>\r
<xsl:choose>\r
- <xsl:when test="@FillRule = 'nonzero' or starts-with(@Data, 'F1 ')"><xsl:attribute name="fill-rule"></xsl:attribute>nonzero</xsl:when>\r
- <xsl:when test="@FillRule = 'evenodd' or starts-with(@Data, 'F0 ')"><xsl:attribute name="fill-rule"></xsl:attribute>evenodd</xsl:when>\r
+ <xsl:when test="@FillRule = 'nonzero' or starts-with(@Data, 'F1 ')"><xsl:attribute name="fill-rule">nonzero</xsl:attribute></xsl:when>\r
+ <xsl:when test="@FillRule = 'evenodd' or starts-with(@Data, 'F0 ')"><xsl:attribute name="fill-rule">evenodd</xsl:attribute></xsl:when>\r
</xsl:choose>\r
<xsl:call-template name="template_properties" /> \r
<xsl:call-template name="template_transform" /> \r