You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fill out the Combinators module with lots of combinators for putting diagrams together. Use the original diagrams library for inspiration. However, I think we should use a record-passing style where each function takes a record of arguments, which has a default instance implemented via a Data.Default instance. Then users get to do named argument passing by passing the default record and overriding selected arguments.
An (incomplete) list of the sort of combinators we will need:
union = mconcat (put a bunch of diagrams on top of one another) * cat (lay out a bunch of diagrams next to each other)
this one should have lots of arguments in its record, e.g. direction along which to lay out the diagrams; separation between diagrams; alignment; distribution method (see e.g. inkscape's align/distribute panel for inspiration)
It may be worth predefining a few aliases for cat with one or two arguments filled in, e.g. hcat and vcat for the common cases of laying out diagrams horizontally or vertically, and so on.
along (lay out diagrams along a path)
not sure of the right API for this, but there might be options for spacing, distribution, that sort of thing. In fact, 'cat' could (and probably should) be implemented in terms of 'along', by first creating an appropriate (straight) path and then calling 'along'. Perhaps 'cat' and 'along' really ought to be unified into one primitive.
The text was updated successfully, but these errors were encountered:
(Imported from http://code.google.com/p/diagrams/issues/detail?id=3. Original issue from byor...@gmail.com on December 23, 2010, 10:17:59 PM UTC)
Fill out the Combinators module with lots of combinators for putting diagrams together. Use the original diagrams library for inspiration. However, I think we should use a record-passing style where each function takes a record of arguments, which has a default instance implemented via a Data.Default instance. Then users get to do named argument passing by passing the default record and overriding selected arguments.
An (incomplete) list of the sort of combinators we will need:
union = mconcat (put a bunch of diagrams on top of one another) * cat (lay out a bunch of diagrams next to each other)
this one should have lots of arguments in its record, e.g. direction along which to lay out the diagrams; separation between diagrams; alignment; distribution method (see e.g. inkscape's align/distribute panel for inspiration)
It may be worth predefining a few aliases for cat with one or two arguments filled in, e.g. hcat and vcat for the common cases of laying out diagrams horizontally or vertically, and so on.
along (lay out diagrams along a path)
not sure of the right API for this, but there might be options for spacing, distribution, that sort of thing. In fact, 'cat' could (and probably should) be implemented in terms of 'along', by first creating an appropriate (straight) path and then calling 'along'. Perhaps 'cat' and 'along' really ought to be unified into one primitive.
The text was updated successfully, but these errors were encountered: