Fix for mindmap connection bar glitches#892
Conversation
hmenke
left a comment
There was a problem hiding this comment.
I haven't reviewed this in too much detail yet, but at first sight this definitely needs some more work.
|
Also how does this behave for gradient linkages such as the ones given just before section 60.4 in the manual? |
|
I've rewritten the patch so that it does not introduce any new parameters. I've also tried to do a better job of understanding TeX's scoping rules; I think this patch should be more robust. Some things are still baffling to me: why does |
|
@ilayn It seems to work fine. |
|
pgfmath uses the same registers internally. pgf/tex/generic/pgf/math/pgfmathutil.code.tex Lines 96 to 104 in a9818b1 |
concepts is less than half the sum of the concepts' radii.
|
Temporary variable names changed to something unique. |
When the distance between two concepts is at least half the sum of the concepts' radii, the connection bar is constructed as expected with initial, bar, and final portions. There is a visual glitch due to abutting filled path segments on certain anti-aliasing PDF rasterizers, including the one built into macOS, but that could be excused because the apparent gap is truly zero-width and a (sane) printer driver would not produce a white line. However, there is a more serious visual glitch when the distance between two concepts is less than the sum of the concepts' radii. In that case, the connection bar path becomes self-intersecting, and the even-odd inclusion test results in unfilled wedges.
This patch unifies the three path segments (initial, bar, and final) into a single continuous filled path segment. It alters the logic which computes the length of the initial and final flares, proportionally reducing them from their nominal values (of one-half the abutted circle radius) in the case where the distance between concept circles would be too small to fit this shape.
Before:

After:

As an added bonus, this patch also eliminates the onscreen glitch on anti-aliasing rasterizers.