aboutsummaryrefslogtreecommitdiff
path: root/src/ppm_pixel_stream.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-05-14 23:06:20 +0200
committerAdrian Kummerlaender2016-05-14 23:06:20 +0200
commit64880ba1019f8c81470d697143b7bf48143b2fc8 (patch)
treef758030b5d151a47b50df233d39215ea5abaec63 /src/ppm_pixel_stream.h
parent8e1d7c4e484ef43dddc5074055727694ceb0e37b (diff)
downloadvoronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar.gz
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar.bz2
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar.lz
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar.xz
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.tar.zst
voronoi-64880ba1019f8c81470d697143b7bf48143b2fc8.zip
Separate into multiple compilation units, add color functions
* fix cartesian coordinate determination
Diffstat (limited to 'src/ppm_pixel_stream.h')
-rw-r--r--src/ppm_pixel_stream.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ppm_pixel_stream.h b/src/ppm_pixel_stream.h
new file mode 100644
index 0000000..9d8f5a8
--- /dev/null
+++ b/src/ppm_pixel_stream.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <string>
+#include <fstream>
+
+#include "color.h"
+
+namespace imgen {
+
+class ppm_pixel_stream {
+ public:
+ ppm_pixel_stream(const std::string& path,
+ const std::size_t width,
+ const std::size_t height);
+
+ ppm_pixel_stream& operator<<(const color& value);
+
+ private:
+ std::ofstream stream_;
+
+};
+
+}