Scenic.Primitives.circle
You're seeing just the function
circle
, go back to Scenic.Primitives module for more information.
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
- Iftrue
, the outline is rendered. Iffalse
, 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 specifyingfill: :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.