From ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 9 Nov 2018 22:59:38 +0800 Subject: Add predefine resource. --- src/graph/graph.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/graph/graph.cpp') diff --git a/src/graph/graph.cpp b/src/graph/graph.cpp index d37b5e2d..70bec35b 100644 --- a/src/graph/graph.cpp +++ b/src/graph/graph.cpp @@ -216,33 +216,4 @@ namespace cru::graph d2d1_factory_->ReloadSystemMetrics() ); } - - ComPtr CreateSolidBrush(const D2D1_COLOR_F& color) - { - const auto device_context = GraphManager::GetInstance()->GetD2D1DeviceContext(); - ComPtr solid_color_brush; - device_context->CreateSolidColorBrush(color, &solid_color_brush); - return solid_color_brush; - } - - ComPtr CreateDefaultTextFormat() - { - const auto dwrite_factory = GraphManager::GetInstance()->GetDWriteFactory(); - - ComPtr text_format; - - ThrowIfFailed(dwrite_factory->CreateTextFormat( - L"等线", nullptr, - DWRITE_FONT_WEIGHT_NORMAL, - DWRITE_FONT_STYLE_NORMAL, - DWRITE_FONT_STRETCH_NORMAL, - 24.0, L"zh-cn", - &text_format - )); - - ThrowIfFailed(text_format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER)); - ThrowIfFailed(text_format->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER)); - return text_format; - } } - -- cgit v1.2.3