diff options
author | crupest <crupest@outlook.com> | 2018-09-16 23:48:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-16 23:48:54 +0800 |
commit | 94c066a34900845297c41c134a9a910124a5833d (patch) | |
tree | fe717d4d80137c005ae3f2c1675ab3ba7d990b23 /CruUI/ui/controls/text_block.cpp | |
parent | 683419f2856d348436ca64cfd4b3abbfc73cda89 (diff) | |
download | cru-94c066a34900845297c41c134a9a910124a5833d.tar.gz cru-94c066a34900845297c41c134a9a910124a5833d.tar.bz2 cru-94c066a34900845297c41c134a9a910124a5833d.zip |
Develop toggle button.
Diffstat (limited to 'CruUI/ui/controls/text_block.cpp')
-rw-r--r-- | CruUI/ui/controls/text_block.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/CruUI/ui/controls/text_block.cpp b/CruUI/ui/controls/text_block.cpp index a3dc23c5..beb799d3 100644 --- a/CruUI/ui/controls/text_block.cpp +++ b/CruUI/ui/controls/text_block.cpp @@ -11,19 +11,13 @@ namespace cru { namespace controls { + using graph::CreateSolidBrush; + inline Microsoft::WRL::ComPtr<IDWriteFactory> GetDWriteFactory() { return graph::GraphManager::GetInstance()->GetDWriteFactory(); } - Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> CreateSolidBrush(const D2D1_COLOR_F& color) - { - const auto device_context = graph::GraphManager::GetInstance()->GetD2D1DeviceContext(); - Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> solid_color_brush; - device_context->CreateSolidColorBrush(color, &solid_color_brush); - return solid_color_brush; - } - TextBlock::TextBlock(const Microsoft::WRL::ComPtr<IDWriteTextFormat>& init_text_format, const Microsoft::WRL::ComPtr<ID2D1Brush>& init_brush) : Control(false) { |