/* -*- C++ -*- * Copyright ©2008 Hugo Mills * * This software is distributed under the terms of the GNU GPL v3 * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #ifndef OUTPUT_CANVAS_H #define OUTPUT_CANVAS_H #include "magellan/output.h" class Output_Canvas : public Output { public: Output_Canvas(int w, int h); virtual ~Output_Canvas(); virtual void setpixel(const ivec2& pos, int r, int g, int b); virtual void commit() { } // Can't draw text on these virtual void textmetrics(const std::string&, const std::string&, ivec2&, ivec2&, ivec2&) { } virtual void drawtext(const std::string&, const std::string&, Output::RenderFlags) { } static Output* parser( ConfigLexer*, const std::string&, const std::string& ); // virtual bool repeated(void) const { return 0; } // virtual int updatetime(void) const { return 0; } void getpixel(ivec3& rgb, const ivec2& pos) const; private: unsigned char* canvas; }; #endif