changeset 393:02cc0734a976

extra options.
author Robert McIntyre <rlm@mit.edu>
date Tue, 05 Nov 2013 16:51:15 -0500
parents bbfdaa42c19a
children b86bc9430119
files org/sense.org
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/sense.org	Mon Jul 15 00:15:48 2013 -0400
     1.2 +++ b/org/sense.org	Tue Nov 05 16:51:15 2013 -0500
     1.3 @@ -257,7 +257,7 @@
     1.4     Returns a function that accepts a BufferedImage and draws it to the
     1.5     JPanel. If given a directory it will save the images as png files
     1.6     starting at 0000000.png and incrementing from there."
     1.7 -  ([#^File save]
     1.8 +  ([#^File save title]
     1.9       (let [idx (atom -1)
    1.10             image
    1.11             (atom
    1.12 @@ -268,7 +268,7 @@
    1.13                 [graphics]
    1.14                 (proxy-super paintComponent graphics)
    1.15                 (.drawImage graphics @image 0 0 nil)))
    1.16 -           frame (JFrame. "Display Image")]
    1.17 +           frame (JFrame. title)]
    1.18         (SwingUtilities/invokeLater
    1.19          (fn []
    1.20            (doto frame
    1.21 @@ -285,6 +285,8 @@
    1.22             (ImageIO/write
    1.23              i "png"
    1.24              (File. save (format "%07d.png" (swap! idx inc))))))))
    1.25 +  ([#^File save]
    1.26 +     (view-image save "Display Image"))
    1.27    ([] (view-image nil)))
    1.28  
    1.29  (defn view-sense