No opacity value in XAML export

Bug #569885 reported by Klaus Leth Pedersen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
jazzynico

Bug Description

Hi I use Inkscape 0.47 r22583, built Nov 21 2009 on Windows XP Professional with SP 3.

I have drawn two rectangles in inkscape the first is filed with a solid red color and
the second is black. Both rectangles objects are convered to paths and the black
rectangle is placed on top of the red and then the Opacity of the black rectangle is lowered to say 127.

When I export this to XAML the Black rectangle is 100% black, because there is no Opacity attribute in the XAML.

 I have attached the svg file with the 2 rectangles and the Output XAML file (I have reformatet the XAML to make it readable)

Tags: exporting xaml

Related branches

Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :
Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :
su_v (suv-lp)
tags: added: exporting xaml
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape bzr rev. 9315.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Also confirmed on Ubuntu 9.10, Inkscape bzr rev. 9373.

The XSL file looks good, and when using an external XLST processor (xalan), the output file is correct.
FYI, Inkscape doesn't use the opacity attribute, but an aRBG code instead (7f000000 for a mid-transparent black).

Revision history for this message
jazzynico (jazzynico) wrote :

Hum, it seems to work with some fill-opacity values, such as 1, 0.8, 0.6, 0... Only values which, when multiplied with 255, give an integer (0.8*255=204)...

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in bzr revision 9378.
Please test!

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.48
Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :

I cannot reproduce that last comment on my windows XP box.

I tried with an opacity value 40% and 80% but in the XAML there is no Opacity value at all.

Revision history for this message
jazzynico (jazzynico) wrote :

Attached is the modified XSL file. You can copy it to the share/extensions/ folder of your existing Inkscape version.

Revision history for this message
jazzynico (jazzynico) wrote :

Klaus, when modifying the opacity with the Fill and Stroke dialog, the saved opacity value doesn't match exactly what you see.
To be sure of what's in your SVG file, use the XML editor (Edit>XML Editor).

Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :

Hi JazzyNico, Thank you for the XML Editor and the XSL file I'm still learning Inscape :-)
The file fixed my problem now the XAML Fill property gets set. I tried with an Opacity 0f 0.33 that is rounded to 84 in Inkscape and In my XAML the fill property now sayes Fill="#54D40000" the 54 fooled me it's a Hex value of course. Thank you again.

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.