aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/graphics/direct/WindowPainter.hpp
blob: 3d66bc2ecfd7f09c04b927beab2bc1eb256f610e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "Painter.hpp"
#include "WindowRenderTarget.hpp"

namespace cru::platform::graphics::win::direct {
class CRU_WIN_GRAPHICS_DIRECT_API D2DWindowPainter
    : public graphics::win::direct::D2DDeviceContextPainter {
 public:
  explicit D2DWindowPainter(D2DWindowRenderTarget* window);

  CRU_DELETE_COPY(D2DWindowPainter)
  CRU_DELETE_MOVE(D2DWindowPainter)

  ~D2DWindowPainter() override;

 protected:
  void DoEndDraw() override;

 private:
  D2DWindowRenderTarget* render_target_;
};
}  // namespace cru::platform::graphics::win::direct