Method: RBPDF#Line

Defined in:
lib/rbpdf.rb

#Line(x1, y1, x2, y2, style = {}) ⇒ Object Also known as: line

Draws a line between two points.

@param float :x1

Abscissa of first point

@param float :y1

Ordinate of first point

@param float :x2

Abscissa of second point

@param float :y2]

Ordinate of second point

@param hash :style

Line style. Array like for SetLineStyle SetLineStyle. Default value: default line style (empty Hash).

@access public
@since 1.0
@see

SetLineWidth(), SetDrawColor(), SetLineStyle()



9084
9085
9086
9087
9088
9089
9090
9091
# File 'lib/rbpdf.rb', line 9084

def Line(x1, y1, x2, y2, style={})
  if style.is_a?(Hash) && !style.empty?
    SetLineStyle(style)
  end
  outPoint(x1, y1)
  outLine(x2, y2)
  out('S')
end