Method: GR.beginprint

Defined in:
lib/gr.rb

.beginprint(file_path) ⇒ Object

Note:

Ruby feature - you can use block to call endprint automatically.

Open and activate a print device.

beginprint opens an additional graphics output device. The device type is obtained from the given file extension

Parameters:

  • pathname (String)

    Filename for the print device. The following file types are supported:

    • .ps, .eps : PostScript

    • .pdf : Portable Document Format

    • .bmp : Windows Bitmap (BMP)

    • .jpeg, .jpg : JPEG image file

    • .png : Portable Network Graphics file (PNG)

    • .tiff, .tif : Tagged Image File Format (TIFF)

    • .svg : Scalable Vector Graphics

    • .wmf : Windows Metafile

    • .mp4 : MPEG-4 video file

    • .webm : WebM video file

    • .ogg : Ogg video file



1594
1595
1596
1597
1598
1599
1600
# File 'lib/gr.rb', line 1594

def beginprint(file_path)
  super(file_path)
  return unless block_given?

  yield
  endprint
end