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

TSVG duplicate attributes for semi-transparent markers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Low
    • Resolution: Fixed
    • 6.19/01
    • master
    • Graphics
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: