Clone of object with "unset paint" inherits wrong alpha

Bug #1183400 reported by Duarte Ramos
16
This bug affects 2 people
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="fill-opacity:1;stroke:none;stroke-opacity:1;stroke-width:8;stroke-miterlimit:4;stroke-dasharray:none;">

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
       style="fill-rule:evenodd;"
       id="Master_Rectangle"
       width="255"
       height="255"
       x="256.5"
       y="540.86218"
       ry="32"
       inkscape:label="#rect2985" />

BAD FILE XML-------------------------------------------------------------------------------------------------------------------
<rect
       style="fill-rule:evenodd;fill-opacity:1"
       id="Master_Rectangle"
       width="255"
       height="255"
       x="256.5"
       y="540.86218"
       ry="32"
       inkscape:label="#rect2985" />

Note the opacity in style style="fill-rule:evenodd;fill-opacity:1"

Attached ZIP file with two variants of the same SVG file one bugged one correct.

Tags: clones color
Revision history for this message
Duarte Ramos (duarte-framos) wrote :
jazzynico (jazzynico)
tags: added: clones color
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape 0.47, 0.48.4 and trunk revision 12387.

Changed in inkscape:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Beluga (buovjaga) wrote :

Still repro, using DrawingCorrect.svg as a starting point.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92+devel 15099 (GTK3)

Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here. You can continue tracking the issue at https://gitlab.com/inkscape/inbox/-/issues/5818

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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