aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/graph/direct/painter.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-05-23 23:50:00 +0800
committercrupest <crupest@outlook.com>2020-05-23 23:50:00 +0800
commitf3a8fd608a9776ef0a5f547da918a32cf6074060 (patch)
tree85b320479296ae12339ee1e28bab66ab001cb44b /include/cru/win/graph/direct/painter.hpp
parent75ff8a6a05afd02aaadf7e3049b0a0e305241182 (diff)
downloadcru-f3a8fd608a9776ef0a5f547da918a32cf6074060.tar.gz
cru-f3a8fd608a9776ef0a5f547da918a32cf6074060.tar.bz2
cru-f3a8fd608a9776ef0a5f547da918a32cf6074060.zip
...
Diffstat (limited to 'include/cru/win/graph/direct/painter.hpp')
-rw-r--r--include/cru/win/graph/direct/painter.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/win/graph/direct/painter.hpp b/include/cru/win/graph/direct/painter.hpp
index 5a1fe03f..4f2164c9 100644
--- a/include/cru/win/graph/direct/painter.hpp
+++ b/include/cru/win/graph/direct/painter.hpp
@@ -4,6 +4,8 @@
#include "cru/platform/graph/painter.hpp"
+#include <vector>
+
namespace cru::platform::graph::win::direct {
class D2DPainter : public DirectResource,
public virtual IPainter,
@@ -35,6 +37,10 @@ class D2DPainter : public DirectResource,
void DrawText(const Point& offset, ITextLayout* text_layout,
IBrush* brush) override;
+ void PushLayer(const Rect& bounds) override;
+
+ void PopLayer() override;
+
void EndDraw() override final;
protected:
@@ -47,6 +53,8 @@ class D2DPainter : public DirectResource,
private:
ID2D1RenderTarget* render_target_;
+ std::vector<Microsoft::WRL::ComPtr<ID2D1Layer>> layers_;
+
bool is_drawing_ = true;
};
} // namespace cru::platform::graph::win::direct