Scenic.Primitives.ellipse

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

ellipse(graph_or_primitive, radii, opts \\ [])

View Source

Specs

ellipse(
  source :: Scenic.Graph.t() | Scenic.Primitive.t(),
  radii :: Scenic.Math.vector_2(),
  options :: list()
) :: Scenic.Graph.t() | Scenic.Primitive.t()

Add an Ellipse to a graph.

Ellipses are defined by two radii.

The following example will draw an ellipse.

graph
|> ellipse( {100, 140} )

If you want the ellipse to be on an angle, apply a :rotate transform.

Styles

Ellipses 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 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
|> ellipse( {40, 60}, fill: :red, stroke: {3, :blue}, rotate: 0.4 )