33 lines
820 B
C++
33 lines
820 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include "INativeDrawingContext.h"
|
|
#include "INativeDrawingSurface.h"
|
|
|
|
class TextElement;
|
|
|
|
class DrawingSurface;
|
|
using DrawingSurfacePtr = std::unique_ptr<DrawingSurface>;
|
|
class DrawingContext;
|
|
using DrawingContextPtr = std::unique_ptr<DrawingContext>;
|
|
|
|
class Rasterizer;
|
|
|
|
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:
|
|
std::unique_ptr<Rasterizer> mRasterizer;
|
|
DrawingSurfacePtr mDrawingSurface {nullptr};
|
|
DrawingContextPtr mDrawingContext {nullptr};
|
|
};
|
|
|
|
using DrawingManagerPtr = std::unique_ptr<DrawingManager>;
|