Handle PointSize in PointBox (roughly) #1407
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally I had this as a hack on svg formatting. Then I saw that asymptote formatting was broken too.
The basic problem is that PointBox doesn't handle PointSize as 0-width points. But the formatters, naturally fill in a nonzero point width. This causes points to extend outside of the viewport for SVG.
PointSize is specified as a fraction of the image width and we might not always have that. And for PointBox we don't have access to the top-level graphics options.
A lot of this should be (re)thought out or documented if it already is.
Either way once you start to disentangle the code, a lot of the weaknesses become apparent.
Fixes #1091