Files
Upsilon/escher/include/escher/image.h
Romain Goyet 42123dd03d KDImage now takes a KDColor buffer as pixel data
This prevents alignment issues, visible on emscripten for example.

Change-Id: I3b25a21214c5f3e4f08e5f299d4c20234a5824f6
2017-07-21 09:54:38 +02:00

20 lines
487 B
C++

#ifndef ESCHER_IMAGE_H
#define ESCHER_IMAGE_H
#include <kandinsky.h>
class Image {
public:
constexpr Image(KDCoordinate width, KDCoordinate height, const KDColor * pixels) :
m_width(width), m_height(height), m_pixels(pixels) {}
KDCoordinate width() const { return m_width; }
KDCoordinate height() const { return m_height; }
const KDColor * pixels() const { return m_pixels; }
private:
KDCoordinate m_width;
KDCoordinate m_height;
const KDColor * m_pixels;
};
#endif