Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10243

TSVG duplicate attributes for semi-transparent markers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 6.19/01
    • Fix Version/s: master
    • Component/s: Graphics
    • Labels:
      None
    • Environment:

      Linux, but I guess it happens on any environment

      Description

      TSVG::SetColor always appends both fill-opacity and stroke-opacity tags, so you end up with duplicate attributes when both "fill" and "stroke" color are being set.

      As far as I can tell SetColor is always called after either a PrintStr("stroke=") or a PrintStr("fill=") so there should probably be two variants, one that sets fill color with its opacity and one that sets stroke color with its opacity. This way you won't get duplicate attributes and invalid svg files.

      Attaching an example of invalid SVG and the code used to produce it.

        Attachments

        1. testalpha.C
          0.9 kB
        2. testalpha.svg
          570 kB

          Activity

            People

            • Assignee:
              couet Olivier Couet
              Reporter:
              6996aec7d0ef8c1d664c Filippo Argiolas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: