From 714a757ee435b83156ddee6b16edc99408357170 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 14 Nov 2018 21:07:59 +0800 Subject: Add fore/bakcground brush. --- src/graph/graph.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/graph/graph.cpp') diff --git a/src/graph/graph.cpp b/src/graph/graph.cpp index 70bec35b..eef95c8c 100644 --- a/src/graph/graph.cpp +++ b/src/graph/graph.cpp @@ -216,4 +216,11 @@ namespace cru::graph d2d1_factory_->ReloadSystemMetrics() ); } + + Microsoft::WRL::ComPtr CreateSolidColorBrush(const D2D1_COLOR_F& color) + { + Microsoft::WRL::ComPtr brush; + ThrowIfFailed(GraphManager::GetInstance()->GetD2D1DeviceContext()->CreateSolidColorBrush(color, &brush)); + return brush; + } } -- cgit v1.2.3