Oliviers-OSS / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

linecolour only works if you also specify textcolour #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an msc file with linecolour specified for an arc
2. generate the png or svg

What is the expected output? What do you see instead?
expected = coloured arcs.
instead = non-coloured arcs.

It seems to only enable colouring on arcs if a textcolour is also 
specified. Here's a sample that illustrates this. I would expect both lines 
to be coloured, but only the first one is.

msc
{
a,b;
a->b [ label="hello" , textcolour="#ff0000", linecolour="#ff0000"];
b=>a [ label="hello" , linecolour="#ff0000"];
}

What version of the product are you using? On what operating system?
Mscgen version 0.16 on Windows XP

Please provide any additional information below, including sample input
file:
sample inputs and outputs are attached.

Original issue reported on code.google.com by dunbar....@gmail.com on 7 Aug 2009 at 11:27

Attachments:

GoogleCodeExporter commented 9 years ago
Hi

This also affects mscgen from svn revision 88. I believe that main.c line 1342 
is (at
least partly) responsible: 

    /* Check for entity arc colouring if not set explicity on the arc */
    if(arcTextColour == NULL)
       {
        arcTextColour = MscGetEntAttrib(m, startCol, MSC_ATTR_ARC_TEXT_COLOUR);
        arcLineColour = MscGetEntAttrib(m, startCol, MSC_ATTR_ARC_LINE_COLOUR);
       }

I think that this should have been two separate ifs.

~Niels

Original comment by NThykier@gmail.com on 7 Aug 2009 at 1:22

GoogleCodeExporter commented 9 years ago
Ian - thanks for reporting.
Neils - thanks for finding the bug.

Original comment by Michael....@gmail.com on 9 Aug 2009 at 2:18

GoogleCodeExporter commented 9 years ago
Fixed by r89.

Original comment by Michael....@gmail.com on 9 Aug 2009 at 2:24