vendor/gems/prawn-core-0.6.3/lib/prawn/graphics.rb
# Draws a Bezier curve from the current drawing position to the
# specified point, bounded by two additional points.
#
#   pdf.curve_to [100,100], :bounds => [[90,90],[75,75]]
#
Draws a Bezier curve from the current drawing position to the
specified point, bounded by two additional points.


Draws a Bezier curve from the current drawing position to the specified point bounded by two additional points .
def curve_to(dest,options={})
       options[:bounds] or raise Prawn::Errors::InvalidGraphicsPath,
         "Bounding points for bezier curve must be specified "+
         "as :bounds => [[x1,y1],[x2,y2]]"
       curve_points = (options[:bounds] << dest).map { |e| translate(e) }
       add_content("%.3f %.3f %.3f %.3f %.3f %.3f c" %
                     curve_points.flatten )
    end
def curve_to ( dest , options = { } ) options [ :bounds ] or raise Prawn :: Errors :: InvalidGraphicsPath , "Bounding points for bezier curve must be specified " + "as :bounds => [[x1,y1],[x2,y2]]" curve_points = ( options [ :bounds ] << dest ) . map { | e | translate ( e ) } add_content ( "%.3f %.3f %.3f %.3f %.3f %.3f c" % curve_points . flatten ) end
Draws a Bezier curve from the current drawing position to the
specified point, bounded by two additional points.
Draws a Bezier curve from the current drawing position to the specified point bounded by two additional points .
dest
<not_specific>
options
<not_specific>