Object
# File lib/prawn/format/text_object.rb, line 101 def add_content(string) @content << string << "\n" end
# File lib/prawn/format/text_object.rb, line 55 def character_space(dc) @content << "#{dc} Tc\n" self end
# File lib/prawn/format/text_object.rb, line 30 def close @content << "ET" self end
# File lib/prawn/format/text_object.rb, line 70 def font(identifier, size) @content << "/#{identifier} #{size} Tf\n" self end
# File lib/prawn/format/text_object.rb, line 65 def leading(dl) @content << "#{dl} TL\n" self end
# File lib/prawn/format/text_object.rb, line 39 def move_by(dx,dy) @last_x += dx @last_y += dy @content << "#{dx} #{dy} Td\n" self end
# File lib/prawn/format/text_object.rb, line 35 def move_to(x, y) move_by(x - @last_x, y - @last_y) end
# File lib/prawn/format/text_object.rb, line 46 def next_line(dy) end
# File lib/prawn/format/text_object.rb, line 25 def open @content = "BT\n" self end
# File lib/prawn/format/text_object.rb, line 75 def render(mode) mode_value = RENDER_MODES[mode] || raise(ArgumentError, "unsupported render mode #{mode.inspect}, should be one of #{RENDER_MODES.keys.inspect}") @content << "#{mode_value} Tr\n" self end
# File lib/prawn/format/text_object.rb, line 81 def rise(value) @content << "#{value} Ts\n" self end
# File lib/prawn/format/text_object.rb, line 86 def rotate(x, y, theta) radians = theta * Math::PI / 180 cos, sin = Math.cos(radians), Math.sin(radians) arr = [cos, sin, -sin, cos, x, y] add_content "%.3f %.3f %.3f %.3f %.3f %.3f Tm" % arr end
# File lib/prawn/format/text_object.rb, line 49 def show(argument) instruction = argument.is_a?(Array) ? "TJ" : "Tj" @content << "#{Prawn::PdfObject(argument, true)} #{instruction}\n" self end
Generated with the Darkfish Rdoc Generator 2.