Method: RTree#postscript

Defined in:
lib/rtree.rb

#postscript(io_arg, style, height: nil, width: nil, margin: 0) ⇒ Object

Create a PostScript plot of the RTree



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/rtree.rb', line 544

def postscript(io_arg, style, height: nil, width: nil, margin: 0)
  if height && width then
    raise ArgumentError, 'cannot specify both height and width'
  end
  if height then
    axis = AXIS_HEIGHT
    extent = height
  else
    axis = AXIS_WIDTH
    extent = width || 216
  end
  RTree::IOUtil.io_with_mode(io_arg, 'w') do |io|
    super(style, axis, extent, margin, io)
  end
end