Method: RGhost::TextIn#initialize

Defined in:
lib/rghost/text_in.rb

#initialize(options = {}) ⇒ TextIn

Options

  • :x and :y - Initial position.

  • :tag or :with - Use predefined tag.

  • :color - Override color of the tag.

  • :text or :write - The text.

Examples

doc=RGhost::Document.new doc.text_in :x => 3, :y => 4, :write => “Foo Bar Baz”, :tag => :h1

Rotating

doc.newpath do

translate :x => 3, :y=> 4
 rotate 45
 text_in :x => 0, :y => 0, :write => "Foo Bar Baz1", :tag => :font2

end

Eval postscript internal

TextIn will eval postscript internal variables you pass in between % signs. Sounds complex, huh? Let’s see an example: doc.text_in :x=> 3.5, :y=> 5.5, :text => “this is %row% row and current page %current_page%”



25
26
27
28
# File 'lib/rghost/text_in.rb', line 25

def initialize(options={})
  
  @options=DEFAULT_OPTIONS.dup.merge(options)
end