diff options
author | crupest <crupest@outlook.com> | 2019-04-02 21:57:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-02 21:57:01 +0800 |
commit | ec201783e4b4733770648c2f92c3ffb9629bb7f7 (patch) | |
tree | 2257b0110b499b73832efbb6dc8d583869d98cf8 /include/cru/platform/win/win_text_layout.hpp | |
parent | 1e0a77c9fd9ffe1423b2e02c989a15071d3205a4 (diff) | |
download | cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.tar.gz cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.tar.bz2 cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.zip |
...
Diffstat (limited to 'include/cru/platform/win/win_text_layout.hpp')
-rw-r--r-- | include/cru/platform/win/win_text_layout.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cru/platform/win/win_text_layout.hpp b/include/cru/platform/win/win_text_layout.hpp new file mode 100644 index 00000000..68961dd7 --- /dev/null +++ b/include/cru/platform/win/win_text_layout.hpp @@ -0,0 +1,24 @@ +#pragma once +#include "win_pre_config.hpp" + +#include "../text_layout.hpp" +#include "win_font.hpp" + +#include <memory> + +namespace cru::platform::win { +class WinTextLayout : public Object, public virtual TextLayout { + public: + explicit WinTextLayout(std::shared_ptr<WinFontDescriptor> font); + WinTextLayout(const WinTextLayout& other) = delete; + WinTextLayout(WinTextLayout&& other) = delete; + WinTextLayout& operator=(const WinTextLayout& other) = delete; + WinTextLayout& operator=(WinTextLayout&& other) = delete; + ~WinTextLayout() override; + + IDWriteTextLayout* GetDWriteTextLayout() const { return text_layout_.Get(); } + + private: + Microsoft::WRL::ComPtr<IDWriteTextLayout> text_layout_; +}; +} // namespace cru::platform::win |