Scenic.Primitives.group_spec
You're seeing just the function
group_spec
, go back to Scenic.Primitives module for more information.
Specs
group_spec( items :: Scenic.Graph.deferred() | [Scenic.Graph.deferred(), ...], options :: list() ) :: Scenic.Graph.deferred()
Bundle a list of specifications together, and return a function that, when called, will add those specs as a group to a graph.
The options are the same as for group/3
Example:
line = {{0, 0}, {60, 60}}
lines = [
line_spec(@line, stroke: {4, :red}),
line_spec(@line, stroke: {20, :green}, cap: :butt, t: {60, 0}),
line_spec(@line, stroke: {20, :yellow}, cap: :round, t: {120, 0}),
]
line_group = group_spec(lines, t: [ 100, 100 ])
graph = line_group.(graph)
You can also pass in a single primitive spec:
line = line_spec({{0, 0}, {60, 60}}, stroke: {4, :red}),
line_group = group_spec(line, t: [ 100, 100 ])
graph = line_group.(graph)