XAML exporter doesn't remove unnecessary filters attributes

Bug #1243394 reported by jazzynico on 2013-10-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Originally reported by AndreR in Bug #177387 "XSLT "effects" extensions don't work", comments 9-11.

I have another problem with exporting XAML files. I just tried to convert "dialog-ok-apply-5.svg" from the Open Icon Library to XAML. The plugin seems to add an effect reference, but the effect description is missing.

Here is the corresponding line:

<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="path3509" StrokeThickness="8" Stroke="{StaticResource radialGradient3511}" StrokeMiterLimit="4" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Effect="{StaticResource filter3521}" Opacity="0.28571428999999998">

There is no static resource "filter3521" in the entire file, though, which lets my program crash:

Zeilennummer "238" und Zeilenposition "247" von "Die Angabe eines Werts für "System.Windows.StaticResourceExtension" führte zu einer Ausnahme.".

Line "238" and line position "247" of "Declaring a valuation for "System.Windows.StaticResourceExtension" led to a exception.".

And here is the inner exception:

Cannot find resource named 'filter3521'. Resource names are case sensitive.

I attatched you the original SVG as well as the exported XAML file, created with a last week's nightly build.

jazzynico (jazzynico) wrote :
Changed in inkscape:
status: New → Triaged
jazzynico (jazzynico) wrote :
jazzynico (jazzynico) wrote :

Note that filters are not fully supported (only blurs, see http://wiki.inkscape.org/wiki/index.php/SpecXAMLExport). But the XAML exporter should remove the Effect attribute. I'll see if it can be fixed for the next Inkscape version.

summary: - XAML exported doesn't remove unnecessary filters attributes
+ XAML exporter doesn't remove unnecessary filters attributes
jazzynico (jazzynico) wrote :

@AndreR - Could you please test the attached XAML file and tell me if it works for you now? I've created it with a modified version of the XSLT file that should correct the bug.

Changed in inkscape:
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

Patched SVG2XAML converter.

jazzynico (jazzynico) wrote :

Fix committed revision 12764.

Changed in inkscape:
status: In Progress → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers