Method: HexaPDF::Content::Canvas#line
- Defined in:
- lib/hexapdf/content/canvas.rb
#line(x0, y0, x1, y1) ⇒ Object
:call-seq:
canvas.line(x0, y0, x1, y1) => canvas
Moves the current point to (x0, y0) and appends a line to (x1, y1) to the current path. Returns self.
If there is no current path when the method is invoked, a new path is automatically begun.
Examples:
#>pdf
canvas.line(10, 10, 100, 100).stroke
See: #move_to, #line_to
1204 1205 1206 1207 |
# File 'lib/hexapdf/content/canvas.rb', line 1204 def line(x0, y0, x1, y1) move_to(x0, y0) line_to(x1, y1) end |