comparison src/laser/rasterize.clj @ 3:e6254010c95a

added raster-comment
author Robert McIntyre <rlm@mit.edu>
date Fri, 20 Aug 2010 00:49:00 -0400
parents 5ed873917c34
children 6533b4ef83ad
comparison
equal deleted inserted replaced
2:5ed873917c34 3:e6254010c95a
62 (defmethod display 62 (defmethod display
63 clojure.lang.PersistentArrayMap [frame-hash] 63 clojure.lang.PersistentArrayMap [frame-hash]
64 (display (frame-hash->bufferedImage frame-hash))) 64 (display (frame-hash->bufferedImage frame-hash)))
65 65
66 66
67 (defn raster-preamble []
68 (str-join \newline
69 ["M63 P0\nG61"
70 (str \F feed)
71 "M101"
72 "M3 S1"]))
73
74 (defn frame-hash 67 (defn frame-hash
75 "yields a convienent representation for the pixles in an image. 68 "yields a convienent representation for the pixles in an image.
76 Because of the size of the structvre generated, this must only be used 69 Because of the size of the structvre generated, this must only be used
77 in a transient way so that java can do it's garbage collection." 70 in a transient way so that java can do it's garbage collection."
78 [#^java.lang.String image-name] 71 [#^java.lang.String image-name]
114 black white)) 107 black white))
115 (vals window))) (meta window))) 108 (vals window))) (meta window)))
116 109
117 110
118 111
112 (defn raster-preamble []
113 (str-join \newline
114 ["M63 P0\nG61"
115 (str \F feed)
116 "M101"
117 "M3 S1"]))
118
119
119 120
120 121
121 122
122 123
123 124