This patch provides a new DSL method for drawing one or more layouts at once. draw_layouts takes a param named "pattern" which is a regex to choose which layouts to draw. Also any layouts to be drawn this way need a new "type" field in the yaml to indicate which method should be used to draw them.
This will allow a single generic call to draw cutlines whether they are a rectangle or a circle or made of multiple primitives.
the layout file duplicates the existing shapes sample script
the script puts all shapes on one card, just layouts with names ending in "-1" and "-2" on the other two cards, with the -2 layouts having their colors overridden.
seeking feedback on this feature in general, this implementation, the naming of the new method and options, necessary tests, etc.
Coverage decreased (-0.2%) to 99.432% when pulling 7d39ea6259f6a22b5dc3e52d3ac19cdb8cf59ca6 on sparr:FEATURE-draw_layouts into 566d0dfaca48eb1bde88ad4b474973153ac7ef08 on andymeneely:master.
This patch provides a new DSL method for drawing one or more layouts at once.
draw_layouts
takes a param named "pattern" which is a regex to choose which layouts to draw. Also any layouts to be drawn this way need a new "type" field in the yaml to indicate which method should be used to draw them.This will allow a single generic call to draw cutlines whether they are a rectangle or a circle or made of multiple primitives.
example test script and layout file in this gist: https://gist.github.com/sparr/650cdcb20d71a443ecc4604dbf467bb9
the layout file duplicates the existing shapes sample script
the script puts all shapes on one card, just layouts with names ending in "-1" and "-2" on the other two cards, with the -2 layouts having their colors overridden.
seeking feedback on this feature in general, this implementation, the naming of the new method and options, necessary tests, etc.