Method: RGhost::TextArea#initialize
- Defined in:
- lib/rghost/textarea.rb
#initialize(text, options = {}, tag_parse = true) ⇒ TextArea
Options
-
:x and :y- Initial position. -
:row_height- Row height :) -
:with- Max wide of the text -
:text_align- Align of the text in the virtual box using :left, :right and :center.
Examples
doc=RGhost::Document.new my_text=“<font1>foo, bar, baz</font1><font2>qux, quux</font2>, corge, grault, garply, waldo, <font3>fred, plugh,</font3> xyzzy,<br/> thud, bing” doc.text_area my_text

doc.text_area my_text, :width =>3

doc.text_area my_text, :width =>3, :text_align => :center

doc.text_area my_text, :width =>3, :text_align => :right

doc.text_area my_text, :width =>3, :text_align => :right, :x => 3

doc.text_area my_text, :width =>3, :text_align => :right, :x => 3, :row_height => 0.6

57 58 59 60 61 62 63 64 |
# File 'lib/rghost/textarea.rb', line 57 def initialize(text,={},tag_parse=true) super("") @text=text @tag_parse=tag_parse ||={} =DEFAULT_OPTIONS.dup.merge() end |