add: Basic Font Rendering
This commit is contained in:
@@ -17,6 +17,15 @@ namespace frame
|
||||
{
|
||||
}
|
||||
|
||||
void Image::Create(uint32_t pWidth, uint32_t pHeight)
|
||||
{
|
||||
mWidth = pWidth;
|
||||
mHeight = pHeight;
|
||||
|
||||
mBuffer.clear();
|
||||
mBuffer.resize(mWidth * mHeight);
|
||||
}
|
||||
|
||||
uint8_t& Image::at(uint32_t x, uint32_t y)
|
||||
{
|
||||
return mBuffer.at(toInternal(x, y));
|
||||
@@ -27,6 +36,13 @@ namespace frame
|
||||
return mBuffer.at(toInternal(x, y));
|
||||
}
|
||||
|
||||
void Image::operator=(Image const& image)
|
||||
{
|
||||
mHeight = image.mHeight;
|
||||
mWidth = image.mWidth;
|
||||
mBuffer = image.mBuffer;
|
||||
}
|
||||
|
||||
size_t Image::toInternal(uint32_t x, uint32_t y) const
|
||||
{
|
||||
return x + mWidth * y;
|
||||
|
||||
Reference in New Issue
Block a user