Prawn::Table::Cell::Image

@private

Public Class Methods

new(pdf, point, options={}) click to toggle source
# File lib/prawn/table/cell/image.rb, line 14
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 61
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 31
def fit=(f)
  @image_options[:fit] = f
end
image=(file) click to toggle source
# File lib/prawn/table/cell/image.rb, line 23
def image=(file)
  @file = file
end
image_height=(h) click to toggle source
# File lib/prawn/table/cell/image.rb, line 35
def image_height=(h)
  @image_options[:height] = h
end
image_width=(w) click to toggle source
# File lib/prawn/table/cell/image.rb, line 39
def image_width=(w)
  @image_options[:width] = w
end
natural_content_height() click to toggle source
# File lib/prawn/table/cell/image.rb, line 55
def natural_content_height
  @natural_height
end
natural_content_width() click to toggle source
# File lib/prawn/table/cell/image.rb, line 51
def natural_content_width
  @natural_width
end
position=(p) click to toggle source
# File lib/prawn/table/cell/image.rb, line 43
def position=(p)
  @image_options[:position] = p
end
scale=(s) click to toggle source
# File lib/prawn/table/cell/image.rb, line 27
def scale=(s)
  @image_options[:scale] = s
end
vposition=(vp) click to toggle source
# File lib/prawn/table/cell/image.rb, line 47
def vposition=(vp)
  @image_options[:vposition] = vp
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.