00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _DRAWABLE_H_
00014 #define _DRAWABLE_H_
00015
00016 #include <string.h>
00017 #include "General/Types.hh"
00018 #include "World/Color.hh"
00019
00020 namespace Graphics {
00021
00023 class Drawable {
00024 protected:
00026 const Int Width, Height;
00029 public:
00031 inline Drawable(Int Width, Int Height)
00032 : Width(Width), Height(Height) {}
00033
00035 virtual ~Drawable() {};
00036
00038 virtual Int GetWidth() const {
00039 return this->Width;
00040 }
00041
00043 virtual Int GetHeight() const {
00044 return this->Height;
00045 }
00046
00048 virtual void PutPixel(Int x, Int y, const World::Color &C) = 0;
00049
00051 virtual void Refresh() = 0;
00052
00054 virtual void Save(const std::string Filename) const = 0;
00055 };
00056 };
00057
00058 #endif