Module: FN::PDF::Node::Watermark
- Includes:
- Node::Base
- Defined in:
- lib/fn/pdf/node/watermark.rb
Constant Summary
Constants included from Node::Base
Node::Base::CURRENT_PAGE_HEIGHT, Node::Base::CURRENT_PAGE_WIDTH
Instance Method Summary collapse
Methods included from Node::Base
#classify, #has_no_children, #mixin, #value, #visit_children, #with_attributes_like
Instance Method Details
#visit(struct, debug = false) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fn/pdf/node/watermark.rb', line 14 def visit(struct, debug = false) has_no_children w = struct[CURRENT_PAGE_WIDTH] h = struct[CURRENT_PAGE_HEIGHT] font = struct.load_font("Arial,Bold", "unicode", "") struct.fit_textline(self["text"], 0, h, "font #{font} fontsize 30 boxsize {#{w} #{h}} fitmethod meet rotate 0 textrendering 1 position {0 50}") end |