This commit is contained in:
2022-03-02 23:54:26 +01:00
parent bd87b1c074
commit f09c4700ba
7 changed files with 43 additions and 17 deletions

View File

@@ -1,12 +1,14 @@
#include "Image.hpp"
#include <stdint.h>
namespace frame
{
Image::Image(uint32_t pWidth, uint32_t pHeight)
: mWidth(pWidth)
, mHeight(pHeight)
, mBuffer(mWidth * mHeight)
, mBuffer(mWidth * mHeight, 0)
{
}
@@ -25,7 +27,7 @@ namespace frame
return mBuffer.at(toInternal(x, y));
}
uint8_t Image::toInternal(uint32_t x, uint32_t y) const
size_t Image::toInternal(uint32_t x, uint32_t y) const
{
return x + mWidth * y;
}