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.
Arbitrary fill patterns! For example geologists have all sorts of standardized patterns they know and love, and this lets you create any pattern you want. It still has the constraint of two colors (foreground and background) and a square unit cell, but now any svg path string is accepted to define the foreground color area.
I chose to do this by adding a new attribute in the
pattern
container,path
. We could instead put the path into theshape
attribute - in fact we only accept one (shape
takes precedence) and for drawing I combine them into one anyway. And this is what we do forline.dash
for example, there's an enumerated set but you also have the option of providing an arbitrary string in the same place. On the other handlayout.shapes
has apath
attribute fortype='path'
shapes and other attributes for other shapes. Alsoline.dash
is somewhat awkward to describe (astring
attribute that nevertheless listsvalues
like an enum?) andshape='<path string>'
is a bit funny to read. I don't feel strongly about this though - if others would prefer to add this into theshape
attribute that would also be fine.