<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,6 +19,13 @@ STANDARD_SIZES = {
   &quot;8x12&quot; =&gt; Size.new(203, 305)
 }
 
+def accumulate(array)
+  array.inject([]) do |mem, val|
+    mem &lt;&lt; (mem.last || 0) + val
+    mem
+  end
+end
+
 print &quot;Enter a WxH size in mm such as '142x204' or one of the standard sizes: #{STANDARD_SIZES.keys.join(&quot;, &quot;)}: &quot;
 size = gets.chomp
 
@@ -31,8 +38,14 @@ end
 
 print &quot;Enter the border width in mm: &quot;
 border_width = gets.chomp.to_i
-puts
 
+print &quot;By how many mms should each edge of the photo overlap the mount board? &quot;
+overlap = gets.chomp.to_i
+
+horizontal = accumulate([0, border_width, size.width  - (2 * overlap), border_width])
+vertical   = accumulate([0, border_width, size.height - (2 * overlap), border_width])
+
+puts
 puts &quot;Markings need to be made at the following positions:&quot;
-puts &quot;Horizontal edges: 0, #{border_width}, #{border_width + size.width}, #{border_width + size.width + border_width}&quot;
-puts &quot;Vertical edges:   0, #{border_width}, #{border_width + size.height}, #{border_width + size.height + border_width}&quot;
+puts &quot;Horizontal edges: &quot; + horizontal.join(&quot;, &quot;)
+puts &quot;Vertical edges:   &quot; + vertical.join(&quot;, &quot;)</diff>
      <filename>mount_board_lines.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ed2f4420f91b2feca0f1460afd2fbb0eb0151c02</id>
    </parent>
  </parents>
  <author>
    <name>Jon Leighton</name>
    <email>j@jonathanleighton.com</email>
  </author>
  <url>http://github.com/jonleighton/scripts/commit/8127a75baf905f866ffadf1293f3879189b04164</url>
  <id>8127a75baf905f866ffadf1293f3879189b04164</id>
  <committed-date>2009-01-10T14:22:23-08:00</committed-date>
  <authored-date>2009-01-10T14:22:23-08:00</authored-date>
  <message>mount_board_lines.rb - should take into account overlap of photo and mount board</message>
  <tree>54a5b78ed3deb6ca30857127c26bf3d6abdd1715</tree>
  <committer>
    <name>Jon Leighton</name>
    <email>j@jonathanleighton.com</email>
  </committer>
</commit>
