Clone of object with "unset paint" inherits wrong alpha
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Low
|
Unassigned |
Bug Description
Inkscape 0.48.4 r9939 and any of 0.49 betas specifically r12339 201305191053 in either Windows XP64bits or Windows 7 64bits
-------
How to reproduce:
-Create a new object (henceforth called "master")
-Set it's fill with "Unset paint (make it undefined so it can be inherited)"
-Now make a clone (henceforth called "clone") of it (Alt+D) and move it to the side
-On the new clone set a new different fill color
-Now set the fill's alpha value to something different than 255
Is the clone object transparent according to its fill's alpha value?
If so bug has manifested itself, if not proceed:
-Select original master object
-Set its fill to any color with an alpha value different than 255
-Now set it back to the option "Unset paint (make it undefined so it can be inherited)"
Master object should have returned to black but it still holds the transparency of the last used alpha value
Now clone maintains inherited color, but not the alpha value, instead always mimicking the master's alpha value
-Return to master object and set its fill and alpha value to full opacity (255)
-Set its fill back to "Unset paint (make it undefined so it can be inherited)"
Now clone object is always fully opaque independent of alpha value set in it's fill, even though color is inherited
-------
Clearing Inkscape's preferences.xml "solves the problem once", that is until you use an alpha value on the master again.
I noticed the affected line of code is the one about "Desktop" style:
<group
id="desktop"
style=
if one clears the style="" it works the first time I use Inkscape, but files affected never behave again
-------
Analyzing a "bugged" file's xml, I notice that the master object's code (incorrectly?) stores an alpha value in the style
GOOD FILE XML----
<rect
width="255"
height="255"
x="256.5"
ry="32"
BAD FILE XML----
<rect
width="255"
height="255"
x="256.5"
ry="32"
Note the opacity in style style="
Attached ZIP file with two variants of the same SVG file one bugged one correct.
tags: | added: clones color |
Reproduced on Windows XP, Inkscape 0.47, 0.48.4 and trunk revision 12387.