Sha256: 927a7bc278a54861a6cc6c1da5358cc774f5123b520f0324aba1fda89843efaf
Contents?: true
Size: 1002 Bytes
Versions: 3
Compression:
Stored size: 1002 Bytes
Contents
# if block['flip'] == "yes" # @pdf.save # @pdf.translate block["x"].to_f + block["x2"].to_f, block["y"].to_f + block["y2"].to_f # @pdf.rotate 180 # @pdf.fit_textflow flow, block["x"].to_f, block["y"].to_f, block["x2"].to_f, block["y2"].to_f, "" # @pdf.restore # else require File.dirname(__FILE__) + "/../../node/base" require "PDFlib" module FN module PDF module Node def Invert(block) FN::Node::Base("invert", :x => block["x"], :y => block["y"], :x2 => block["x"].to_f + block["width"].to_f, :y2 => block["y"].to_f + block["height"].to_f ).extend(Invert) end module Invert include FN::Node::Base def visit(struct) struct.save struct.translate self["x"].to_f + self["x2"].to_f, self["y"].to_f + self["y2"].to_f struct.rotate 180 visit_children struct struct.restore end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fn_document-0.9.6 | lib/fn/pdf/node/invert.rb |
fn_document-0.9.4 | lib/fn/pdf/node/invert.rb |
fn_document-0.9.3 | lib/fn/pdf/node/invert.rb |