Scenic.Primitives.path
You're seeing just the function
path
, go back to Scenic.Primitives module for more information.
Specs
path( source :: Scenic.Graph.t() | Scenic.Primitive.t(), elements :: list(), options :: list() ) :: Scenic.Graph.t() | Scenic.Primitive.t()
Add custom, complex shape to a graph.
A custom path is defined by a list of actions that the renderer can follow. This is about as close as Scenic gets to immediate mode rendering.
See Scenic.Primitive.Path
for details.
graph
|> path( [
:begin,
{:move_to, 10, 20},
{:line_to, 30, 40},
{:bezier_to, 10, 11, 20, 21, 30, 40},
{:quadratic_to, 10, 11, 50, 60},
{:arc_to, 70, 80, 90, 100, 20},
:close_path,
],
stroke: {4, :blue}, cap: :round
)