<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -196,19 +196,25 @@ module Prawn
     # 
     #   pdf.fill_color &quot;f0ffc1&quot;
     #
-    def fill_color(color)
+    def fill_color(color=nil)
+      return @fill_color unless color
       @fill_color = color
       set_fill_color     
-    end                                                                      
+    end 
+    
+    alias_method :fill_color=, :fill_color                                                                     
     
     # Sets the line stroking color.  6 digit HTML color codes are used.
     #
     #   pdf.stroke_color &quot;cc2fde&quot;
     #
-    def stroke_color(color) 
+    def stroke_color(color=nil) 
+      return @stroke_color unless color
       @stroke_color = color
       set_stroke_color
-    end
+    end   
+    
+    alias_method :stroke_color=, :stroke_color
     
     # Strokes and closes the current path.
     #
@@ -265,9 +271,11 @@ module Prawn
       add_content &quot;%.3f %.3f %.3f RG&quot; %  [r / 255.0, g / 255.0, b / 255.0]       
     end                                       
     
-    def update_colors                                         
-      set_fill_color   if @fill_color
-      set_stroke_color if @stroke_color
+    def update_colors 
+      @fill_color   ||= &quot;000000&quot;
+      @stroke_color ||= &quot;000000&quot;                                       
+      set_fill_color
+      set_stroke_color
     end
 
   end</diff>
      <filename>lib/prawn/graphics.rb</filename>
    </modified>
    <modified>
      <diff>@@ -177,29 +177,28 @@ module Prawn
 
         # TODO: This is a bit of a hack and can be cleaned up
         if @background_color
-          old_fill_color, old_stroke_color = 
-           @document.instance_eval { [@fill_color, @stroke_color] }
-          @document.fill_color @background_color
-          @document.stroke_color @background_color
-
-          @document.canvas do
-            case border_style
-            when :all
-              point = [x,y-border]
-              h = height - border
-            when :no_top
-              point = [x,y-border/2.0]  
-              h     = height - border / 2.0
-            else
-              point = [x,y-border/2.0]
-              h     = height
-           end
+
+          @document.mask(:fill_color, :stroke_color) do
+            @document.fill_color = @background_color
+            @document.stroke_color = @background_color
+
+            @document.canvas do
+              case border_style
+              when :all
+                point = [x,y-border]
+                h = height - border
+              when :no_top
+                point = [x,y-border/2.0]  
+                h     = height - border / 2.0
+              else
+                point = [x,y-border/2.0]
+                h     = height
+             end
                     
-            @document.fill_and_stroke_rectangle point, width, h
-          end
+              @document.fill_and_stroke_rectangle point, width, h
+            end
+          end   
 
-          @document.fill_color old_fill_color || &quot;000000&quot;
-          @document.stroke_color old_stroke_color || &quot;000000&quot;
         end
 
         @cells.each do |e|</diff>
      <filename>lib/prawn/graphics/cell.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c9b31cbf847268af540ad76e603922eaca347d10</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/3867937e578440e363e0f67f927adf006228450a</url>
  <id>3867937e578440e363e0f67f927adf006228450a</id>
  <committed-date>2008-07-24T12:42:49-07:00</committed-date>
  <authored-date>2008-07-24T12:42:49-07:00</authored-date>
  <message>More cleanup of earlier hacks and making things more normal when working outside of the generate block</message>
  <tree>6ffccd64b01d35afa96728b1cedfb5f8c420b39f</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
