Scenic.Primitives.update_opts
You're seeing just the function
update_opts
, go back to Scenic.Primitives module for more information.
Specs
update_opts(Scenic.Primitive.t(), options :: list()) :: Scenic.Primitive.t()
Update the options of a primitive without changing its data.
This is not used during graph creation - only when modifying it later.
All the primitive-specific helpers require you to specify the data for the primitive. If you only want to modify a transform or add a style, then use this function.
Example:
Graph.modify(graph, :rect, fn(p) ->
update_opts(p, rotate: 0.5)
end)
# or, more compactly...
Graph.modify(graph, :rect, &update_opts(&1, rotate: 0.5) )