Scenic.Graph.add

You're seeing just the function add, go back to Scenic.Graph module for more information.

Specs

add(graph :: t(), primitive :: Scenic.Primitive.t()) :: t()

Add a pre-built primitive to the current group in the graph.

This is usually called during graph construction. When a new Group primitive is added to a Graph, it marks the new group as the current one before calling the group's builder function. This is what allows you to add primitives to the correct place in the new Group.

Note: All primitives added to a group are appended to the draw order.

Link to this function

add(graph, primitive_module, primitive_data, opts \\ [])

View Source

Specs

add(graph :: t(), module :: atom(), data :: any(), opts :: keyword()) :: t()

Build and add a primitive to the current group in the graph.

This is usually called during graph construction. When a new Group primitive is added to a Graph, it marks the new group as the current one before calling the group's builder function. This is what allows you to add primitives to the correct place in the new Group.

Note: All primitives added to a group are appended to the draw order.