aboutsummaryrefslogtreecommitdiff
path: root/src/platform_win/win_brush.cpp
blob: 189dfd57a837e8bc5f8d1cc97e5895bd9b8fd61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "cru/platform/win/win_brush.hpp"

#include "cru/platform/win/d2d_util.hpp"
#include "cru/platform/win/exception.hpp"

#include <cassert>

namespace cru::platform::win {
WinSolidColorBrush::WinSolidColorBrush(
    Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> brush) {
  assert(brush);
  brush_ = std::move(brush);
}

ui::Color cru::platform::win::WinSolidColorBrush::GetColor() {
  return util::Convert(brush_->GetColor());
}
void WinSolidColorBrush::SetColor(const ui::Color& color) {
  brush_->SetColor(util::Convert(color));
}
}  // namespace cru::platform::win