41 lines
715 B
C++
41 lines
715 B
C++
|
#include "DrawingSurface.h"
|
||
|
|
||
|
|
||
|
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;
|
||
|
}
|