Scenic.Primitives.circle

You're seeing just the function circle, go back to Scenic.Primitives module for more information.
Link to this function

circle(graph_or_primitive, radius, opts \\ [])

View Source

Specs

circle(
  source :: Scenic.Graph.t() | Scenic.Primitive.t(),
  radius :: number(),
  options :: list()
) :: Scenic.Graph.t() | Scenic.Primitive.t()

Add a Circle to a graph.

Circles are defined by a radius.

The following example will draw circle with radius 100.

graph
|> circle( 100 )

Styles

Circles honor the following styles

  • :hidden - If true, the outline is rendered. If false, it is skipped. Default: false.
  • :fill - Fills in the interior with the specified paint. If not set, the default is to not draw anything in the interior. This is similar to specifying fill: :clear, but more optimized.
  • :stroke - The width and paint to draw the outline with. If the stroke is not specified, the default stroke is {1, :white}.

Example:

graph
|> circle( 40, fill: :red, stroke: {3, :blue}, translate: {100, 200} )

While you could apply a :rotate transform to a circle, it wouldn't do anything visible unless you also add a uneven :scale transform to make it into an ellipse.