<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,44 @@
 module Prawn
+
+  class Document
+    # Builds and renders a Graphics::Cell.  A cell is essentially a
+    # special-purpose bounding box designed for flowing text within a bordered
+    # area.  For available options, see Graphics::Cell#new.
+    #
+    #    Prawn::Document.generate(&quot;cell.pdf&quot;) do
+    #       cell [100,500], 
+    #         :width =&gt; 200,
+    #         :text  =&gt; &quot;The rain in Spain falls mainly on the plains&quot;
+    #    end
+    #
+    def cell(point, options={})
+      Prawn::Graphics::Cell.new(options.merge(:document =&gt; self, :point =&gt; point)).draw
+    end
+  end
+
   module Graphics
+    # A cell is a special-purpose bounding box designed to flow text within a
+    # bordered area. This is used by Prawn's Document::Table implementation but
+    # can also be used standalone for drawing text boxes via Document#cell
+    #
     class Cell
+
+      # Creates a new cell object.  Generally used indirectly via Document#cell
+      #
+      # Of the available options listed below, &lt;tt&gt;:point&lt;/tt&gt;, &lt;tt&gt;:width&lt;/tt&gt;,
+      # and &lt;tt&gt;:text&lt;/tt&gt; must be provided. If you are not using the
+      # Document#cell shortcut, the &lt;tt&gt;:document&lt;/tt&gt; must also be provided.
+      #
+      # &lt;tt&gt;:point&lt;/tt&gt;:: Absolute [x,y] coordinate of the top-left corner of the cell.
+      # &lt;tt&gt;:document&lt;/tt&gt;:: The Prawn::Document object to render on. 
+      # &lt;tt&gt;:text&lt;/tt&gt;:: The text to be flowed within the cell
+      # &lt;tt&gt;:width&lt;/tt&gt;:: The width in PDF points of the cell.
+      # &lt;tt&gt;:border&lt;/tt&gt;:: The border line width. If omitted, no border will be drawn.
+      # &lt;tt&gt;:horizontal_padding&lt;/tt&gt;:: The horizontal padding in PDF points
+      # &lt;tt&gt;:vertical_padding&lt;/tt&gt;:: The vertical padding in PDF points
+      # &lt;tt&gt;:padding&lt;/tt&gt;:: Overrides both horizontal and vertical padding
+      # &lt;tt&gt;:border_style&lt;/tt&gt;:: One of &lt;tt&gt;:all&lt;/tt&gt;, &lt;tt&gt;:no_top&lt;tt&gt;, &lt;tt&gt;:no_bottom&lt;/tt&gt;, &lt;tt&gt;:sides&lt;/tt&gt;
+      #
       def initialize(options={})
         @point        = options[:point]
         @document     = options[:document]
@@ -18,27 +56,37 @@ module Prawn
       end
 
       attr_accessor :point, :border_style, :border
-      attr_writer   :height
+      attr_writer   :height #:nodoc:
 
+      # The width of the text area excluding the horizonal padding
+      #
       def text_area_width
         width - 2*@horizontal_padding
       end
 
+      # The width of the cell in PDF points
+      #
       def width
         @width || (@document.font_metrics.string_width(@text,
           @document.current_font_size)) + 2*@horizontal_padding
       end
 
+      # The height of the cell in PDF points
+      #
       def height
         @height || text_area_height + 2*@vertical_padding
       end
 
+      # The height of the text area excluding the vertical padding
+      #
       def text_area_height
         @document.font_metrics.string_height(@text, 
          :font_size  =&gt; @document.current_font_size, 
          :line_width =&gt; text_area_width) 
       end
 
+      # Draws the cell onto the PDF document
+      # 
       def draw
         rel_point = [@point[0] - @document.bounds.absolute_left,
                      @point[1] - @document.bounds.absolute_bottom]
@@ -82,6 +130,8 @@ module Prawn
         end
       end
 
+      private
+
       def borders
         @borders ||= case @border_style
         when :all
@@ -97,8 +147,10 @@ module Prawn
 
     end
 
-    # TODO: A temporary, entertaining name that should probably be changed.
-    class CellBlock
+    class CellBlock #:nodoc:
+
+      # Not sure if this class is something I want to expose in the public API.
+
       def initialize(document)
         @document = document
         @cells    = []
@@ -157,9 +209,4 @@ module Prawn
     end
   end
  
-  class Document
-    def cell(point, options={})
-      Prawn::Graphics::Cell.new(options.merge(:document =&gt; self, :point =&gt; point)).draw
-    end
-  end
 end</diff>
      <filename>lib/prawn/graphics/cell.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ff7cd9e6260894c9e2d131bd7c5b1b44f694816</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/7d41b8861009dfc81a9ff9f34337380447789efe</url>
  <id>7d41b8861009dfc81a9ff9f34337380447789efe</id>
  <committed-date>2008-06-26T16:08:12-07:00</committed-date>
  <authored-date>2008-06-26T16:08:12-07:00</authored-date>
  <message>Cell API docs [#26]</message>
  <tree>5ed8e9a6df2fd651669852f54cd8bf355e107c2e</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
