diff options
author | Adrian Kummerlaender | 2016-05-14 23:06:20 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2016-05-14 23:06:20 +0200 |
commit | 64880ba1019f8c81470d697143b7bf48143b2fc8 (patch) | |
tree | f758030b5d151a47b50df233d39215ea5abaec63 /src/imgen.h | |
parent | 8e1d7c4e484ef43dddc5074055727694ceb0e37b (diff) | |
download | voronoi-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/imgen.h')
-rw-r--r-- | src/imgen.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/imgen.h b/src/imgen.h index 35b798d..6954239 100644 --- a/src/imgen.h +++ b/src/imgen.h @@ -1,24 +1,13 @@ +#pragma once + #include <string> -#include <utility> -#include <fstream> #include <functional> -namespace imgen { - -using color = std::tuple<std::uint8_t, std::uint8_t, std::uint8_t>; +#include "color.h" -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_; +namespace imgen { -}; +using colored_vector = std::tuple<int, int, color>; void write_ppm( const std::string& path, |