#include "DrawingSurface.h" #include "Image.h" std::unique_ptr DrawingSurface::Create() { return std::make_unique(); } void DrawingSurface::setSize(unsigned width, unsigned height) { mWidth = width; mHeight = height; } unsigned DrawingSurface::getWidth() const { return mWidth; } unsigned DrawingSurface::getHeight() const { return mHeight; } Image* DrawingSurface::getImage() { if (!mBackingImage) { mBackingImage = std::make_unique >(mWidth, mHeight); mBackingImage->initialize(); } return mBackingImage.get(); }