36 lines
No EOL
549 B
C++
36 lines
No EOL
549 B
C++
#pragma once
|
|
|
|
#include "Color.h"
|
|
|
|
#include <wrl.h>
|
|
|
|
class SceneModel;
|
|
class DirectX2dInterface;
|
|
|
|
struct ID2D1SolidColorBrush;
|
|
|
|
namespace D2D1
|
|
{
|
|
class ColorF;
|
|
}
|
|
|
|
class DirectX2dPainter
|
|
{
|
|
public:
|
|
void startDrawing();
|
|
|
|
void clearBackground(const Color& color);
|
|
|
|
void finishDrawing();
|
|
|
|
void paint(SceneModel* model);
|
|
|
|
void setD2dInterface(DirectX2dInterface* d2dIterface);
|
|
|
|
private:
|
|
static D2D1::ColorF toD2dColor(const Color& color);
|
|
|
|
Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> mSolidBrush;
|
|
|
|
DirectX2dInterface* mD2dInterface{ nullptr };
|
|
}; |