diff options
author | crupest <crupest@outlook.com> | 2019-04-10 19:42:46 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-10 19:42:46 +0800 |
commit | 7351020a582d70a1495249fba87d342c8a1fb634 (patch) | |
tree | e80f225041dc3816b3dce21c7e15aadbb211602e /include/cru/win/graph/win_font.hpp | |
parent | a94a806f69586e08a30fff0cdb3e52b0ce7acfa5 (diff) | |
download | cru-7351020a582d70a1495249fba87d342c8a1fb634.tar.gz cru-7351020a582d70a1495249fba87d342c8a1fb634.tar.bz2 cru-7351020a582d70a1495249fba87d342c8a1fb634.zip |
Refactor.
Diffstat (limited to 'include/cru/win/graph/win_font.hpp')
-rw-r--r-- | include/cru/win/graph/win_font.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/cru/win/graph/win_font.hpp b/include/cru/win/graph/win_font.hpp new file mode 100644 index 00000000..3301e8da --- /dev/null +++ b/include/cru/win/graph/win_font.hpp @@ -0,0 +1,28 @@ +#pragma once +#include "../win_pre_config.hpp" + +#include "cru/platform/graph/font.hpp" + +#include <string_view> + +namespace cru::win::graph { +class GraphManager; + +class WinFontDescriptor : public Object, + public virtual platform::graph::FontDescriptor { + public: + explicit WinFontDescriptor(GraphManager* graph_manager, + const std::wstring_view& font_family, + float font_size); + WinFontDescriptor(const WinFontDescriptor& other) = delete; + WinFontDescriptor(WinFontDescriptor&& other) = delete; + WinFontDescriptor& operator=(const WinFontDescriptor& other) = delete; + WinFontDescriptor& operator=(WinFontDescriptor&& other) = delete; + ~WinFontDescriptor() override = default; + + IDWriteTextFormat* GetDWriteTextFormat() const { return text_format_.Get(); } + + private: + Microsoft::WRL::ComPtr<IDWriteTextFormat> text_format_; +}; +} // namespace cru::win::graph |