Add offscreen text rendering.
This commit is contained in:
parent
c63138c455
commit
076e32b1d6
17 changed files with 156 additions and 101 deletions
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "FontItem.h"
|
||||
|
||||
#include <wrl.h>
|
||||
#include <dwrite.h>
|
||||
#include <d2d1_3.h>
|
||||
|
@ -25,15 +27,12 @@ class DirectXTextPainter
|
|||
public:
|
||||
DirectXTextPainter();
|
||||
|
||||
void initialize();
|
||||
|
||||
void paint(SceneText* text, DrawingContext* context);
|
||||
|
||||
void setD2dInterface(DirectX2dInterface* d2dIterface);
|
||||
|
||||
private:
|
||||
void initializeBrush();
|
||||
void updateTextFormat(float fontSize);
|
||||
void updateTextFormat(const FontItem& font);
|
||||
|
||||
DirectX2dInterface* mD2dInterface{ nullptr };
|
||||
Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> mTextBrush;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue