### Home Classes Methods

### In Files

- lib/prawn/table/cell/image.rb

### Parent

Prawn::Table::Cell

### Methods

- ::new
- #draw_content
- #fit=
- #image=
- #image_height=
- #image_width=
- #natural_content_height
- #natural_content_width
- #position=
- #scale=
- #vposition=

### Class/Module Index

Quicksearch

- Prawn
- Prawn::Configurable
- Prawn::Document
- Prawn::Document::BoundingBox
- Prawn::Document::ColumnBox
- Prawn::Document::GraphicsState
- Prawn::Document::Grid
- Prawn::Document::GridBox
- Prawn::Document::Internals
- Prawn::Document::Security
- Prawn::Document::Snapshot
- Prawn::Encoding
- Prawn::Errors
- Prawn::Font
- Prawn::Font::AFM
- Prawn::Font::DFont
- Prawn::Font::TTF
- Prawn::FontMetricCache
- Prawn::Graphics
- Prawn::Graphics::CapStyle
- Prawn::Graphics::Color
- Prawn::Graphics::Dash
- Prawn::Graphics::JoinStyle
- Prawn::Graphics::Patterns
- Prawn::Graphics::Transformation
- Prawn::Graphics::Transparency
- Prawn::ImageHandler
- Prawn::Images
- Prawn::Images::Image
- Prawn::Images::JPG
- Prawn::Images::PNG
- Prawn::Measurements
- Prawn::SoftMask
- Prawn::Stamp
- Prawn::SynchronizedCache
- Prawn::Table
- Prawn::Table::Cell
- Prawn::Table::Cell::Image
- Prawn::Table::Cell::InTable
- Prawn::Table::Cell::SpanDummy
- Prawn::Table::Cell::Subtable
- Prawn::Table::Cell::Text
- Prawn::Table::Cells
- Prawn::Table::ColumnWidthCalculator
- Prawn::Text
- Prawn::Text::Box
- Prawn::Text::Formatted
- Prawn::Text::Formatted::Box
- Prawn::Text::Formatted::Fragment
- Prawn::Text::Formatted::Parser
- Prawn::ThreadLocalCache
- PDF
- PDF::Core
- PDF::Core::Reference
- PDF::Core::Stream
- Arcfour
- Numeric

No matching classes.

# 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.