From 94c066a34900845297c41c134a9a910124a5833d Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 16 Sep 2018 23:48:54 +0800 Subject: Develop toggle button. --- CruUI/ui/controls/text_block.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'CruUI/ui/controls/text_block.cpp') 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 GetDWriteFactory() { return graph::GraphManager::GetInstance()->GetDWriteFactory(); } - Microsoft::WRL::ComPtr CreateSolidBrush(const D2D1_COLOR_F& color) - { - const auto device_context = graph::GraphManager::GetInstance()->GetD2D1DeviceContext(); - Microsoft::WRL::ComPtr solid_color_brush; - device_context->CreateSolidColorBrush(color, &solid_color_brush); - return solid_color_brush; - } - TextBlock::TextBlock(const Microsoft::WRL::ComPtr& init_text_format, const Microsoft::WRL::ComPtr& init_brush) : Control(false) { -- cgit v1.2.3