<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -42,7 +42,7 @@ module GitTrip
     def pixel_mode
       @image.ordered_dither
     end
-    
+
     # Radialize &lt;tt&gt;@image&lt;/tt&gt;
     def radial_mode
       @image.radial_blur(90)</diff>
      <filename>lib/git-trip/paint_mode.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ module GitTrip
       :format =&gt; 'png',
       :header =&gt; false,
       :label  =&gt; false,
+      :mode   =&gt; nil,
       :style  =&gt; 'horizontal',
       :width  =&gt; 50,
       :height =&gt; 50
@@ -27,6 +28,7 @@ module GitTrip
     # * &lt;tt&gt;header&lt;/tt&gt;: If true, prints a header above the image, defaults to true; see +name+.
     # * &lt;tt&gt;label&lt;/tt&gt;: If true, the commit SHA will be included in the image; defaults to false.
     # * &lt;tt&gt;name&lt;/tt&gt;: The text to use above the commit image; only used if +header+ is true.
+    # * &lt;tt&gt;mode&lt;/tt&gt;: If set, will generate a picture with the given render mode.  See PaintMode::MODES.
     # * &lt;tt&gt;style&lt;/tt&gt;: Generated image style; see STYLES.
     # * &lt;tt&gt;width&lt;/tt&gt;: Generated commit image width.
     # * &lt;tt&gt;height&lt;/tt&gt;: Generated commit image height.
@@ -54,13 +56,19 @@ module GitTrip
       height = @options[:height]
       size = get_dimensions
 
-      montage = @canvas.montage do
+      image = @canvas.montage do
         self.geometry = Magick::Geometry.new(width, height)
         self.title = name if header
         self.tile = Magick::Geometry.new(size.first, size.last) if size
+      end.flatten_images
+
+      # Conditionally apply a PaintMode.
+      if @options[:mode]
+        @picture = PaintMode.new(image, @options[:mode]).picture
+      else
+        @picture = image
       end
 
-      @picture = montage.flatten_images
       @picture.format = @options[:format]
       return (@picture ? true : false)
     end</diff>
      <filename>lib/git-trip/painter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -170,4 +170,17 @@ describe Painter do
     File.exists?(test_file).should be_true
     File.delete(test_file) if File.exists?(test_file)
   end
+
+  it &quot;should allow a mode option&quot; do
+    @painter = Painter.new(@commit, :mode =&gt; :blend)
+    @painter.should be_instance_of(Painter)
+    @painter.paint!
+    @painter.picture.should be_instance_of(Magick::Image)
+  end
+
+  it &quot;should raise Errors::InvalidMode&quot; do
+    lambda do
+      Painter.new(@commit, :mode =&gt; 'invalid').paint!
+    end.should raise_error(Errors::InvalidMode)
+  end
 end</diff>
      <filename>spec/git-trip/painter_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,11 +52,9 @@ def gen_test_images(dir, repo_dir)
     base_dir = &quot;#{dir}/#{format}&quot;
     FileUtils.mkpath(base_dir) unless File.exists?(base_dir)
     repo.commits.each_with_index do |commit, index|
-      painter = GitTrip::Painter.new(commit)
+      painter = GitTrip::Painter.new(commit, :mode =&gt; :blend)
       painter.paint!
       painter.picture.write(&quot;#{base_dir}/#{index}.#{format}&quot;)
-      cool_pic = GitTrip::PaintMode.new(painter.picture, :radial).picture
-      cool_pic.write(&quot;#{base_dir}/#{index}-pretty.#{format}&quot;)
     end
     header(&quot;Images written to #{base_dir}&quot;)
   end</diff>
      <filename>tasks/gittrip.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9a60eae585e422e11e27ce3542643c4d3da04111</id>
    </parent>
  </parents>
  <author>
    <name>Dale Campbell</name>
    <email>dale@save-state.net</email>
  </author>
  <url>http://github.com/Oshuma/git-trip/commit/e8a8f7607b5546f8d3829182a2689a0bf94a9007</url>
  <id>e8a8f7607b5546f8d3829182a2689a0bf94a9007</id>
  <committed-date>2008-07-10T23:35:34-07:00</committed-date>
  <authored-date>2008-07-10T23:35:34-07:00</authored-date>
  <message>Painter now has a mode option which will be passed to PaintMode</message>
  <tree>9d1fa9b14bfda7d5893dc829b77b2e8320af9d74</tree>
  <committer>
    <name>Dale Campbell</name>
    <email>dale@save-state.net</email>
  </committer>
</commit>
