Description: When you have a group of elements like so: <g id="g1" opacity=".5"> <circle id="circle1" cx="100" cy="60" fill="#f00" r="40"/> <circle id="circle2" cx="70" cy="100" fill="#0f0" r="40"/> <circle id="circle3" cx="130" cy="100" fill="#00f" r="40"/> </g> the group opacity seems to be applied after all the other attributes in other SVG implementations This means that, when group elements overlap: - the colors are not mixed - the opacities are not mixed Optimally we'd render the entire group in the correct order, and then apply the opacity. I've attached two examples with two comparisons to demonstrate, left is LO, right is Chrome Steps to Reproduce: 1. Open attached SVG Actual Results: - Expected Results: - Reproducible: Always User Profile Reset: No Additional Info: -
Created attachment 180898 [details] example 1
Created attachment 180899 [details] comparison 1, LO left, Chrome right
Created attachment 180900 [details] example 2
Created attachment 180901 [details] comparison 2, LO left, Chrome right
confirm in Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: ab12274ffda3a1a5a1ff33203acf9de665d4a636 CPU threads: 4; OS: Mac OS X 12.4; UI render: default; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded
The problem is that the code first apply the opacity to each circle and then it groups them, it should be the other way around. The current behaviour is when code looks like <g id="g1"> <circle id="circle1" cx="100" cy="60" fill="#f00" r="40" opacity="0.5"/> <circle id="circle2" cx="70" cy="100" fill="#0f0" r="40" opacity="0.5"/> <circle id="circle3" cx="130" cy="100" fill="#00f" r="40" opacity="0.5"/> </g>
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/56039daae4a436d7ea1b093a02cf0e8ad3bda4a9 tdf#149673: only check opacity from parent... It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/f59804171e2ecb92d9ea554812f847000c17bceb tdf#149673: only check opacity from parent... It will be available in 7.6.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.