circle
circle()
Draws a circle or ellipse.
circle((0,0))
// Draws an ellipse
circle((0,-2), radius: (0.75, 0.5))
position:
The position to place the circle on.
Styling
Root: circle
A number that defines the size of the circle's radius. Can also be set to a tuple of two numbers to define the radii of an ellipse, the first number is the x
radius and the second is the y
radius.
Anchors
Supports border and path anchors. The "center"
anchor is the default.
circle-through
circle-through()
Draws a circle through three coordinates.
let (a, b, c) = ((0,0), (2,-.5), (1,1))
line(a, b, c, close: true, stroke: gray)
circle-through(a, b, c, name: "c")
circle("c.center", radius: .05, fill: red)
a:
Coordinate a.
b:
Coordinate b.
c:
Coordinate c.
Styling
Root: circle
circle-through
has the same styling as circle except for radius
as the circle's radius is calculated by the given coordinates.
Anchors
Supports the same anchors as circle as well as:
- a: Coordinate a
- b: Coordinate b
- c: Coordinate c