Class: RGhost::Eps

Inherits:
PsObject show all
Defined in:
lib/rghost/eps.rb

Overview

Load new EPS file.

Instance Method Summary collapse

Methods inherited from PsObject

#<<, #call, #graphic_scope, #raw, #set, #to_s

Constructor Details

#initialize(eps_path, options = {:x=>0, :y=> 0, :rotate => 0}) ⇒ Eps

Examples

doc=Document.new doc.set Eps.new “/local/templates/myform.eps”, :x => 10, :y => 3 Using Image.for facade doc.set Image.for “/local/templates/myform.eps”, :x => 10, :y => 3 Using PsFacade or Document doc.image “/local/templates/myform.eps”, :x => 10, :y => 3

Options

  • :x and :y - Coordinates to position.

  • :rotate - Angle to image rotation if there is one.



15
16
17
18
19
# File 'lib/rghost/eps.rb', line 15

def initialize(eps_path,options={:x=>0, :y=> 0, :rotate => 0})
  super("")
  @options=options
  @path=eps_path
end

Instance Method Details

#psObject



22
23
24
25
26
# File 'lib/rghost/eps.rb', line 22

def ps
  
  "BeginEPSF \n #{RGhost::Cursor.translate(@options)} \n\t(#{@path}) run \nEndEPSF\n ";

end