Method: Prawn::Graphics#circle

Defined in:
lib/prawn/graphics.rb

#circle(center, radius) ⇒ void

This method returns an undefined value.

Draws a circle of radius ‘radius` with the centre-point at `point` as a complete subpath. The drawing point will be moved to the centre-point upon completion of the drawing the circle.

Examples:

pdf.circle [100, 100], 25

Parameters:

  • center (Array(Number, Number))
  • radius (Number)


261
262
263
# File 'lib/prawn/graphics.rb', line 261

def circle(center, radius)
  ellipse(center, radius, radius)
end