vendor/gems/prawn-0.3.0/lib/prawn/graphics.rb
# Draws an ellipse of +x+ radius <tt>r1</tt> and +y+ radius <tt>r2</tt>
# with the centre-point at <tt>point</tt> as a complete subpath. The
# drawing point will be moved to the centre-point upon completion of the
# drawing the ellipse.
#
#    # draws an ellipse with x-radius 25 and y-radius 50
#    pdf.ellipse_at [100,100], 25, 50
#
Draws an ellipse of +x+ radius r1 and +y+ radius r2
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 ellipse.

draws an ellipse with x-radius 25 and y-radius 50
pdf.ellipse_at [100,100], 25, 50
Draws an ellipse of + x + radius r1 and + y + radius r2 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 ellipse . draws an ellipse with x - radius 25 and y - radius 50 pdf . ellipse_at [ 100 100 ] 25 50
def ellipse_at(point, r1, r2 = r1)
      x, y = point
      l1 = r1 * KAPPA
      l2 = r2 * KAPPA
      move_to(x + r1, y)
      curve_to [x,  y + r2],
        :bounds => [[x + r1, y + l1], [x + l2, y + r2]]
      curve_to [x - r1, y],
        :bounds => [[x - l2, y + r2], [x - r1, y + l1]]
      curve_to [x, y - r2],
        :bounds => [[x - r1, y - l1], [x - l2, y - r2]]
      curve_to [x + r1, y],
        :bounds => [[x + l2, y - r2], [x + r1, y - l1]]
      move_to(x, y)
    end
def ellipse_at ( point , r1 , r2 = r1 ) x , y = point l1 = r1 * KAPPA l2 = r2 * KAPPA move_to ( x + r1 , y ) curve_to [ x , y + r2 ] , :bounds => [ [ x + r1 , y + l1 ] , [ x + l2 , y + r2 ] ] curve_to [ x - r1 , y ] , :bounds => [ [ x - l2 , y + r2 ] , [ x - r1 , y + l1 ] ] curve_to [ x , y - r2 ] , :bounds => [ [ x - r1 , y - l1 ] , [ x - l2 , y - r2 ] ] curve_to [ x + r1 , y ] , :bounds => [ [ x + l2 , y - r2 ] , [ x + r1 , y - l1 ] ] move_to ( x , y ) end
Draws an ellipse of +x+ radius <tt>r1</tt> and +y+ radius <tt>r2</tt>
with the centre-point at <tt>point</tt> as a complete subpath.
Draws an ellipse of + x + radius <tt > r1< / tt > and + y + radius <tt > r2< / tt > with the centre - point at <tt > point< / tt > as a complete subpath .
# Upper right hand corner # Upper left hand corner # Lower left hand corner # Lower right hand corner
point
<not_specific>
r1
<not_specific>
r2
<not_specific>