ruby-libgd

GD::Image#circle

Draws a circle outline with optional stroke thickness.

Signature

circle(cx, cy, radius, color, thickness: 1)

Parameters

Example

img = GD::Image.new(300,300)
red = img.color(255,0,0)
img.circle(150,150,60,red, thickness: 3)
img.save("circle.png")

Notes

Implemented natively in ruby-libgd using gdImageArc for stroke thickness support.