Method: RBPDF#Curve
- Defined in:
- lib/rbpdf.rb
#Curve(x0, y0, x1, y1, x2, y2, x3, y3, style = '', line_style = nil, fill_color = nil) ⇒ Object Also known as: curve
Draws a Bezier curve. The Bezier curve is a tangent to the line between the control points at either end of the curve.
- @param float :x0
-
Abscissa of start point.
- @param float :y0
-
Ordinate of start point.
- @param float :x1
-
Abscissa of control point 1.
- @param float :y1
-
Ordinate of control point 1.
- @param float :x2
-
Abscissa of control point 2.
- @param float :y2
-
Ordinate of control point 2.
- @param float :x3
-
Abscissa of end point.
- @param float :y3
-
Ordinate of end point.
- @param string :style
-
Style of rendering. See the getPathPaintOperator() function for more information.
- @param array :line_style
-
Line style of curve. Array like for SetLineStyle SetLineStyle. Default value: default line style (empty array).
- @param array :fill_color
-
Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
- @access public
- @see
-
SetLineStyle()
- @since 2.1.000 (2008-01-08)
8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 |
# File 'lib/rbpdf.rb', line 8419 def Curve(x0, y0, x1, y1, x2, y2, x3, y3, style='', line_style=nil, fill_color=nil) if style and (style.index('F') != nil) and fill_color SetFillColorArray(fill_color) end op = getPathPaintOperator(style) if line_style SetLineStyle(line_style) end outPoint(x0, y0) outCurve(x1, y1, x2, y2, x3, y3) out(op) end |