The circle
shape draws a circle on the canvas. To draw the circle provide the center
parameter that specifies the center of the circle, and the radius
specifying the radius of it.
To understand how to declare and draw a shape please refer, to this document.
To declare and draw a circle named TheBigRedCircle
that is centered at point (250, 250)
with radius of 100
and thickness of 4
units, filled with Red color we write the following statement.
shape TheBigRedCircle(circle):
.color = BLACK
.fill = RED
.center = (250, 250)
.radius = 100
.thickness = 4
endshape
Parameter | Description | Possible values | Default | Required? |
---|---|---|---|---|
center | position of the center of the circle | point | - | Yes |
radius | radius of the circle | 0 to 500 | - | Yes |
thickness | the thickness of the circle | 1 to 100 | 2 | No |
color | the color of the border | builtin colors | BLACK | No |
fill | the color to fill the circle with | builtin colors | WHITE | No |
Notice any errors or typos? Please let us know or feel free to edit circle.md and issue a pull request.
Follow us on twitter @RevineLang
Built by Arpit Bhayani