RgbaBitmap.h 439 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "ColorRgba.h"
  3. #include "Bitmap.h"
  4. namespace Javelin {
  5. class RgbaBitmap : public Bitmap {
  6. public:
  7. RgbaBitmap(int w, int h)
  8. : Bitmap(w, h, 4) {
  9. }
  10. const ColorRgba<unsigned char> *GetData() const {
  11. return reinterpret_cast<ColorRgba<unsigned char> *>(data);
  12. }
  13. ColorRgba<unsigned char> *GetData() {
  14. return reinterpret_cast<ColorRgba<unsigned char> *>(data);
  15. }
  16. };
  17. }