aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/NullPainter.h
blob: 27cb63938813ba099f2680da7e0518c7d9d4b686 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include "Painter.h"
#include "cru/base/Base.h"

namespace cru::platform::graphics {
class CRU_PLATFORM_GRAPHICS_API NullPainter : public Object,
                                              public virtual IPainter {
 public:
  NullPainter() = default;

  CRU_DELETE_COPY(NullPainter)
  CRU_DELETE_MOVE(NullPainter)

  ~NullPainter() override = default;

 public:
  String GetPlatformId() const override { return u"NULL"; }

  String GetDebugString() override { return u"NullPainter"; }

  Matrix GetTransform() override { return Matrix(); }
  void SetTransform(const Matrix& matrix) override { CRU_UNUSED(matrix) }

  void ConcatTransform(const Matrix& matrix) override { CRU_UNUSED(matrix) }

  void Clear(const Color& color) override { CRU_UNUSED(color) }

  void DrawLine(const Point& start, const Point& end, IBrush* brush,
                float width) override {
    CRU_UNUSED(start) CRU_UNUSED(end) CRU_UNUSED(brush) CRU_UNUSED(width)
  }
  void StrokeRectangle(const Rect& rectangle, IBrush* brush,
                       float width) override {
    CRU_UNUSED(rectangle) CRU_UNUSED(brush) CRU_UNUSED(width)
  }
  void FillRectangle(const Rect& rectangle, IBrush* brush) override {
    CRU_UNUSED(rectangle)
    CRU_UNUSED(brush)
  }
  void StrokeEllipse(const Rect& outline_rect, IBrush* brush,
                     float width) override {
    CRU_UNUSED(outline_rect)
    CRU_UNUSED(brush)
    CRU_UNUSED(width)
  }
  void FillEllipse(const Rect& outline_rect, IBrush* brush) override {
    CRU_UNUSED(outline_rect)
    CRU_UNUSED(brush)
  }

  void StrokeGeometry(IGeometry* geometry, IBrush* brush,
                      float width) override {
    CRU_UNUSED(geometry)
    CRU_UNUSED(brush)
    CRU_UNUSED(width)
  }
  void FillGeometry(IGeometry* geometry, IBrush* brush) override {
    CRU_UNUSED(geometry)
    CRU_UNUSED(brush)
  }

  void DrawText(const Point& offset, ITextLayout* text_layout,
                IBrush* brush) override {
    CRU_UNUSED(offset)
    CRU_UNUSED(text_layout)
    CRU_UNUSED(brush)
  }

  void DrawImage(const Point& offset, IImage* image) override {
    CRU_UNUSED(offset)
    CRU_UNUSED(image)
  }

  void PushLayer(const Rect& bounds) override { CRU_UNUSED(bounds) }

  void PopLayer() override {}

  void PushState() override {}

  void PopState() override {}

  void EndDraw() override {}
};
}  // namespace cru::platform::graphics