32 lines
815 B
C
32 lines
815 B
C
|
#pragma once
|
||
|
|
||
|
#include <memory>
|
||
|
#include "INativeDrawingContext.h"
|
||
|
#include "INativeDrawingSurface.h"
|
||
|
#include "CairoInterface.h"
|
||
|
|
||
|
class TextElement;
|
||
|
|
||
|
class DrawingSurface;
|
||
|
using DrawingSurfacePtr = std::unique_ptr<DrawingSurface>;
|
||
|
class DrawingContext;
|
||
|
using DrawingContextPtr = std::unique_ptr<DrawingContext>;
|
||
|
|
||
|
class DrawingManager
|
||
|
{
|
||
|
public:
|
||
|
DrawingManager();
|
||
|
static std::unique_ptr<DrawingManager> Create();
|
||
|
void InitalizeSurface(unsigned width, unsigned height);
|
||
|
void InitializeContext();
|
||
|
void AddText(TextElement* text);
|
||
|
void RenderToFile(const std::string& path);
|
||
|
|
||
|
private:
|
||
|
DrawingSurfacePtr mDrawingSurface {nullptr};
|
||
|
DrawingContextPtr mDrawingContext {nullptr};
|
||
|
CairoInterfacePtr mCairoInterface {nullptr};
|
||
|
};
|
||
|
|
||
|
using DrawingManagerPtr = std::unique_ptr<DrawingManager>;
|