-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for mindmap connection bar glitches #892
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed this in too much detail yet, but at first sight this definitely needs some more work.
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
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
|
tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
Outdated
Show resolved
Hide resolved
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.