diff options
author | 杨宇千 <crupest@outlook.com> | 2018-11-14 21:16:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 21:16:00 +0800 |
commit | f78359cc042f089b2f99b23dd3df7ae02ecdabec (patch) | |
tree | 637aaae9536229ef903c403e35418652732889a1 /src/graph/graph.cpp | |
parent | 77f9d6d47660b642c991809387e4e5c114760f84 (diff) | |
parent | 714a757ee435b83156ddee6b16edc99408357170 (diff) | |
download | cru-f78359cc042f089b2f99b23dd3df7ae02ecdabec.tar.gz cru-f78359cc042f089b2f99b23dd3df7ae02ecdabec.tar.bz2 cru-f78359cc042f089b2f99b23dd3df7ae02ecdabec.zip |
Merge pull request #19 from crupest/forebackground-brush
Add fore/bakcground brush.
Diffstat (limited to 'src/graph/graph.cpp')
-rw-r--r-- | src/graph/graph.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<ID2D1SolidColorBrush> CreateSolidColorBrush(const D2D1_COLOR_F& color) + { + Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> brush; + ThrowIfFailed(GraphManager::GetInstance()->GetD2D1DeviceContext()->CreateSolidColorBrush(color, &brush)); + return brush; + } } |