Method: PDF::Writer::Graphics#rectangle
- Defined in:
- lib/pdf/writer/graphics.rb
#rectangle(x, y, w, h = w) ⇒ Object
Draw a rectangle. The first corner is (x, y) and the second corner is (x + w, y - h).
- New Point
-
(x + w, y - h) - Subpath
-
Current
365 366 367 368 |
# File 'lib/pdf/writer/graphics.rb', line 365 def rectangle(x, y, w, h = w) add_content("\n%.3f %.3f %.3f %.3f re" % [ x, y, w, h ]) self end |