### Home Classes Methods

### In Files

- lib/prawn/measurements.rb

### Methods

- #cm2mm
- #cm2pt
- #dm2mm
- #dm2pt
- #ft2in
- #ft2pt
- #in2pt
- #m2mm
- #m2pt
- #mm2pt
- #pt2mm
- #pt2pt
- #yd2in
- #yd2pt

### 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::Measurements

@group Stable API

### Public Instance Methods

cm2mm(cm) click to toggle source

    ============================================================================

metric conversions

    # File lib/prawn/measurements.rb, line 12
    def cm2mm(cm)
      return cm*10
    end

cm2pt(cm) click to toggle source

    # File lib/prawn/measurements.rb, line 60
    def cm2pt(cm)
      return mm2pt(cm2mm(cm))
    end

dm2mm(dm) click to toggle source

    # File lib/prawn/measurements.rb, line 16
    def dm2mm(dm)
      return dm*100
    end

dm2pt(dm) click to toggle source

    # File lib/prawn/measurements.rb, line 64
    def dm2pt(dm)
      return mm2pt(dm2mm(dm))
    end

ft2in(ft) click to toggle source

imperial conversions from en.wikipedia.org/wiki/Imperial_units

    # File lib/prawn/measurements.rb, line 28
    def ft2in(ft)
      return ft * 12
    end

ft2pt(ft) click to toggle source

    # File lib/prawn/measurements.rb, line 48
    def ft2pt(ft)
      return in2pt(ft2in(ft))
    end

in2pt(inch) click to toggle source

    # File lib/prawn/measurements.rb, line 44
    def in2pt(inch)
      return inch * 72
    end

m2mm(m) click to toggle source

    # File lib/prawn/measurements.rb, line 20
    def m2mm(m)
      return m*1000
    end

m2pt(m) click to toggle source

    # File lib/prawn/measurements.rb, line 68
    def m2pt(m)
      return mm2pt(m2mm(m))
    end

mm2pt(mm) click to toggle source

    # File lib/prawn/measurements.rb, line 56
    def mm2pt(mm)
        return mm*(72 / 25.4)
    end

pt2mm(pt) click to toggle source

    # File lib/prawn/measurements.rb, line 72
    def pt2mm(pt)
      return pt * 1 / mm2pt(1)# (25.4 / 72)
    end

pt2pt(pt) click to toggle source

PostscriptPoint-converisons

    # File lib/prawn/measurements.rb, line 40
    def pt2pt(pt)
      return pt
    end

yd2in(yd) click to toggle source

    # File lib/prawn/measurements.rb, line 32
    def yd2in(yd)
      return yd*36
    end

yd2pt(yd) click to toggle source

    # File lib/prawn/measurements.rb, line 52
    def yd2pt(yd)
      return in2pt(yd2in(yd))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.