#pragma once namespace msdfgen { /// A floating-point RGB pixel. struct FloatRGB { float r, g, b; }; /// A 2D image bitmap. template class Bitmap { public: Bitmap(); Bitmap(int width, int height); Bitmap(const Bitmap &orig); #ifdef MSDFGEN_USE_CPP11 Bitmap(Bitmap &&orig); #endif ~Bitmap(); Bitmap & operator=(const Bitmap &orig); #ifdef MSDFGEN_USE_CPP11 Bitmap & operator=(Bitmap &&orig); #endif /// Bitmap width in pixels. int width() const; /// Bitmap height in pixels. int height() const; T & operator()(int x, int y); const T & operator()(int x, int y) const; private: T *content; int w, h; }; }