Split d2d integration into own class.
This commit is contained in:
parent
0d3674faac
commit
0c84a53643
25 changed files with 361 additions and 155 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
class DrawingContext;
|
||||
class DirectXShaderProgram;
|
||||
class DirectX2dInterface;
|
||||
|
||||
class TextData;
|
||||
class SceneText;
|
||||
|
@ -24,14 +25,17 @@ class DirectXTextPainter
|
|||
public:
|
||||
DirectXTextPainter();
|
||||
|
||||
void initialize(ID2D1DeviceContext2* d2dContext, IDWriteFactory* directWriteFactory);
|
||||
void initialize();
|
||||
|
||||
void paint(SceneText* text, DrawingContext* context, ID2D1DeviceContext2* d2dContext, IDWriteFactory* directWriteFactory);
|
||||
void paint(SceneText* text, DrawingContext* context);
|
||||
|
||||
void setD2dInterface(DirectX2dInterface* d2dIterface);
|
||||
|
||||
private:
|
||||
void initializeBrush(ID2D1DeviceContext2* d2dContext);
|
||||
void updateTextFormat(IDWriteFactory* directWriteFactory, float fontSize);
|
||||
void initializeBrush();
|
||||
void updateTextFormat(float fontSize);
|
||||
|
||||
DirectX2dInterface* mD2dInterface{ nullptr };
|
||||
Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> mTextBrush;
|
||||
Microsoft::WRL::ComPtr<IDWriteTextFormat> mTextFormat;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue