2021-04-17 12:57:14 +00:00
|
|
|
#include "DrawingSurface.h"
|
|
|
|
|
2022-05-15 15:14:04 +00:00
|
|
|
#include "Image.h"
|
2021-04-17 12:57:14 +00:00
|
|
|
|
|
|
|
std::unique_ptr<DrawingSurface> DrawingSurface::Create()
|
|
|
|
{
|
|
|
|
return std::make_unique<DrawingSurface>();
|
|
|
|
}
|
|
|
|
|
|
|
|
INativeDrawingSurface* DrawingSurface::GetNativeSurface()
|
|
|
|
{
|
|
|
|
if (mNativeDrawingSurface)
|
|
|
|
{
|
|
|
|
return mNativeDrawingSurface.get();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DrawingSurface::SetNativeSurface(std::unique_ptr<INativeDrawingSurface> surface)
|
|
|
|
{
|
|
|
|
mNativeDrawingSurface = std::move(surface);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DrawingSurface::SetSize(unsigned width, unsigned height)
|
|
|
|
{
|
|
|
|
mWidth = width;
|
|
|
|
mHeight = height;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned DrawingSurface::GetWidth() const
|
|
|
|
{
|
|
|
|
return mWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned DrawingSurface::GetHeight() const
|
|
|
|
{
|
|
|
|
return mHeight;
|
|
|
|
}
|
2022-05-15 13:58:31 +00:00
|
|
|
|
|
|
|
void DrawingSurface::Paint(Grid* grid)
|
|
|
|
{
|
2022-05-15 15:14:04 +00:00
|
|
|
//mImageBuffer = std::make_unique<Image>();
|
2022-05-15 13:58:31 +00:00
|
|
|
}
|