#pragma once

#include <memory>

#include "INativeDrawingSurface.h"

class Grid;
class Image;

class DrawingSurface
{
public:
    DrawingSurface() = default;

    static std::unique_ptr<DrawingSurface> Create();

    INativeDrawingSurface* GetNativeSurface();

    void SetNativeSurface(std::unique_ptr<INativeDrawingSurface> surface);

    void SetSize(unsigned width, unsigned height);

    unsigned GetWidth() const;

    unsigned GetHeight() const;

    void Paint(Grid* grid);

    Image* GetAsImage() const;

private:

    unsigned mWidth = 0;
    unsigned mHeight = 0;
    std::unique_ptr<Image> mImageBuffer;
    std::unique_ptr<INativeDrawingSurface> mNativeDrawingSurface;
};
