mgansler / mscgen

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

Incorrect sizing of multi-line text in parallel arcs #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

The following msc will reproduce the problem

msc {
    A, B, C, D;
    |||;
    A box B [label="Single Line Text"],
    C box D [label="Multiple\nLines\nof\nText\nof\nparallel\narc"];
    |||;
    A box C [label="Box at incorrect vertical position"];
    |||;
}

What is the expected output? What do you see instead?

Resizing of arc according to text inside works only for the first arc in a 
parallel set of arcs. Second and subsequent parallel arcs takes the vertical 
size of first arc.

What version of the product are you using? On what operating system?

0.18, Any OS

Please provide any additional information below, including sample input
file:

In code, setting of ymax around lines 592 and 1465 should not be based on 
addLines flag. Instead it should be set to maximum of all ymax calculations as 
below. The fix below is not tested and is just pointing out the problem. Some 
other changes may be required to correct the issue.

if (addLines)
{
    ymin = ymax = nextYmin;
}

temp = ymin + gOpts.arcSpacing;
if(arcLabelLines > 1)
{
    temp += (arcLabelLines - 2) * drw.textHeight(&drw);
}

/* Use temp instead of ymax in the ... code below */

...
...

if (temp > ymax) ymax = temp;

addLines = TRUE;
nextYmin = ymax + 1;

Original issue reported on code.google.com by arunmozh...@gmail.com on 17 Sep 2010 at 3:15

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r156.

Original comment by Michael....@gmail.com on 17 Oct 2010 at 10:08

GoogleCodeExporter commented 8 years ago
"Top" aligned parallel arcs will give an impression that the arcs are not 
parallel. See the difference between top aligned and middle aligned parallel 
arcs in the attached picture.

Original comment by v.arunmo...@gmail.com on 18 Oct 2010 at 2:44

Attachments:

GoogleCodeExporter commented 8 years ago
One more simple msc to illustrate the problem.

msc {
    A, B, C;
    A -> B [label="Message"],
    B -> C [label="Message\nwith\nmultiple\lines\nof\text"];
}

Please reopen this issue.

Original comment by v.arunmo...@gmail.com on 18 Oct 2010 at 2:57

Attachments:

GoogleCodeExporter commented 8 years ago
May be this issue can remain closed and the alignment problem fixed as part of 
fix for issue 44. Please note that the fix for this alignment issue is part of 
the patch given in the issue 44.

Original comment by arunmozh...@gmail.com on 18 Oct 2010 at 6:58

GoogleCodeExporter commented 8 years ago
Now that I have an array of row heights, fixing this should be easier.

I'll re-review this after further changes to do with inter-row spacing.

Original comment by Michael....@gmail.com on 19 Oct 2010 at 8:01

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r161.

Original comment by Michael....@gmail.com on 26 Oct 2010 at 8:17