blob: c81019c0ae41045d24c6d49eaaf94ad65ddaa502 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "../win_pre_config.hpp"
#include "cru/platform/graph/brush.hpp"
namespace cru::win::graph {
struct IWinNativeFactory;
struct IWinBrush : virtual platform::graph::IBrush {
virtual ID2D1Brush* GetD2DBrush() = 0;
};
class WinSolidColorBrush : public Object,
public virtual platform::graph::ISolidColorBrush,
public virtual IWinBrush {
public:
WinSolidColorBrush(IWinNativeFactory* factory, const ui::Color& color);
WinSolidColorBrush(const WinSolidColorBrush& other) = delete;
WinSolidColorBrush(WinSolidColorBrush&& other) = delete;
WinSolidColorBrush& operator=(const WinSolidColorBrush& other) = delete;
WinSolidColorBrush& operator=(WinSolidColorBrush&& other) = delete;
~WinSolidColorBrush() override = default;
ui::Color GetColor() override;
void SetColor(const ui::Color& color) override;
ID2D1Brush* GetD2DBrush() override { return brush_.Get(); }
private:
Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> brush_;
};
} // namespace cru::win::graph
|