aboutsummaryrefslogtreecommitdiff
path: root/src/graph/graph.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-09 22:59:38 +0800
committercrupest <crupest@outlook.com>2018-11-09 22:59:38 +0800
commitac4b0f8d438e7a7c2ecd836af8332b5da1e035c9 (patch)
treee5b886f1884fa56dd90059523b1f4dc730bb5003 /src/graph/graph.cpp
parent4b219b569c16db6027dd36e4656152f261321c60 (diff)
downloadcru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.gz
cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.bz2
cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.zip
Add predefine resource.
Diffstat (limited to 'src/graph/graph.cpp')
-rw-r--r--src/graph/graph.cpp29
1 files changed, 0 insertions, 29 deletions
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<ID2D1SolidColorBrush> CreateSolidBrush(const D2D1_COLOR_F& color)
- {
- const auto device_context = GraphManager::GetInstance()->GetD2D1DeviceContext();
- ComPtr<ID2D1SolidColorBrush> solid_color_brush;
- device_context->CreateSolidColorBrush(color, &solid_color_brush);
- return solid_color_brush;
- }
-
- ComPtr<IDWriteTextFormat> CreateDefaultTextFormat()
- {
- const auto dwrite_factory = GraphManager::GetInstance()->GetDWriteFactory();
-
- ComPtr<IDWriteTextFormat> 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;
- }
}
-