class Prawn::Table::Cell::Image
@private
Public Class Methods
new(pdf, point, options={})
click to toggle source
Calls superclass method
Prawn::Table::Cell::new
# File lib/prawn/table/cell/image.rb, line 15 def initialize(pdf, point, options={}) @image_options = {} super @pdf_object, @image_info = @pdf.build_image_object(@file) @natural_width, @natural_height = @image_info.calc_image_dimensions( @image_options) end
Public Instance Methods
draw_content()
click to toggle source
Draw the image on the page.
# File lib/prawn/table/cell/image.rb, line 62 def draw_content @pdf.embed_image(@pdf_object, @image_info, @image_options) end
fit=(f)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 32 def fit=(f) @image_options[:fit] = f end
image=(file)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 24 def image=(file) @file = file end
image_height=(h)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 36 def image_height=(h) @image_options[:height] = h end
image_width=(w)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 40 def image_width=(w) @image_options[:width] = w end
natural_content_height()
click to toggle source
# File lib/prawn/table/cell/image.rb, line 56 def natural_content_height @natural_height end
natural_content_width()
click to toggle source
# File lib/prawn/table/cell/image.rb, line 52 def natural_content_width @natural_width end
position=(p)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 44 def position=(p) @image_options[:position] = p end
scale=(s)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 28 def scale=(s) @image_options[:scale] = s end
vposition=(vp)
click to toggle source
# File lib/prawn/table/cell/image.rb, line 48 def vposition=(vp) @image_options[:vposition] = vp end