#ifndef PNM_SAVE_POSTSCRIPT_H #define PNM_SAVE_POSTSCRIPT_H #include #include #include #include #include #include #include #include namespace CVD { namespace PS { class WritePimpl; class writer { public: writer(std::ostream&, ImageRef size, const std::string& type, const std::map>& p); ~writer(); void write_raw_pixel_line(const byte*); void write_raw_pixel_line(const Rgb*); template struct Outgoing { typedef byte type; }; static const int top_row_first = 0; protected: std::unique_ptr t; }; template struct writer::Outgoing> { typedef Rgb type; }; template struct writer::Outgoing> { typedef Rgb type; }; template <> struct writer::Outgoing { typedef Rgb type; }; class eps_writer { public: eps_writer(std::ostream&, ImageRef size, const std::string& type, const std::map>& p); ~eps_writer(); void write_raw_pixel_line(const byte*); void write_raw_pixel_line(const Rgb*); template struct Outgoing { typedef typename writer::Outgoing::type type; }; static const int top_row_first = 1; protected: std::unique_ptr t; }; } } #endif