aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/direct2d/WindowPainter.h
blob: 01ff3b32d2375e35e56ceb1f2dffd4d0de641ad2 (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.h"
#include "WindowRenderTarget.h"

namespace cru::platform::graphics::direct2d {
class CRU_WIN_GRAPHICS_DIRECT_API D2DWindowPainter
    : public graphics::direct2d::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::direct2d