stuff-from-scratch/src/graphics/DrawingSurface.h

30 lines
558 B
C
Raw Normal View History

2021-04-17 12:57:14 +00:00
#pragma once
#include <memory>
#include "INativeDrawingSurface.h"
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;
private:
unsigned mWidth = 0;
unsigned mHeight = 0;
std::unique_ptr<INativeDrawingSurface> mNativeDrawingSurface;
};