aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graph
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/graph')
-rw-r--r--include/cru/platform/graph/base.hpp12
-rw-r--r--include/cru/platform/graph/factory.hpp4
-rw-r--r--include/cru/platform/graph/fwd.hpp12
-rw-r--r--include/cru/platform/graph/geometry.hpp2
-rw-r--r--include/cru/platform/graph/painter.hpp5
-rw-r--r--include/cru/platform/graph/text_layout.hpp9
6 files changed, 26 insertions, 18 deletions
diff --git a/include/cru/platform/graph/base.hpp b/include/cru/platform/graph/base.hpp
index 8c2a2d2f..0b011262 100644
--- a/include/cru/platform/graph/base.hpp
+++ b/include/cru/platform/graph/base.hpp
@@ -2,3 +2,15 @@
#include "../graph_base.hpp"
#include "../matrix.hpp"
#include "../resource.hpp"
+
+#include "fwd.hpp"
+
+#include <memory>
+
+namespace cru::platform::graph {
+struct TextHitTestResult {
+ int position;
+ bool trailing;
+ bool insideText;
+};
+} // namespace cru::platform::graph
diff --git a/include/cru/platform/graph/factory.hpp b/include/cru/platform/graph/factory.hpp
index 2c52cbb8..0ed45161 100644
--- a/include/cru/platform/graph/factory.hpp
+++ b/include/cru/platform/graph/factory.hpp
@@ -1,15 +1,13 @@
#pragma once
-#include "base.hpp"
+#include "resource.hpp"
#include "brush.hpp"
#include "font.hpp"
#include "geometry.hpp"
#include "text_layout.hpp"
-#include <memory>
#include <string>
#include <string_view>
-#include <utility>
namespace cru::platform::graph {
// Entry point of the graph module.
diff --git a/include/cru/platform/graph/fwd.hpp b/include/cru/platform/graph/fwd.hpp
new file mode 100644
index 00000000..508a49fa
--- /dev/null
+++ b/include/cru/platform/graph/fwd.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+namespace cru::platform::graph {
+struct IGraphFactory;
+struct IBrush;
+struct ISolidColorBrush;
+struct IFont;
+struct IGeometry;
+struct IGeometryBuilder;
+struct IPainter;
+struct ITextLayout;
+} // namespace cru::platform::graph
diff --git a/include/cru/platform/graph/geometry.hpp b/include/cru/platform/graph/geometry.hpp
index a49453dd..85ffd3f6 100644
--- a/include/cru/platform/graph/geometry.hpp
+++ b/include/cru/platform/graph/geometry.hpp
@@ -1,8 +1,6 @@
#pragma once
#include "resource.hpp"
-#include <memory>
-
namespace cru::platform::graph {
struct IGeometry : virtual IGraphResource {
virtual bool FillContains(const Point& point) = 0;
diff --git a/include/cru/platform/graph/painter.hpp b/include/cru/platform/graph/painter.hpp
index 3ae9cf1c..1f4ab7cb 100644
--- a/include/cru/platform/graph/painter.hpp
+++ b/include/cru/platform/graph/painter.hpp
@@ -1,10 +1,7 @@
#pragma once
-#include "base.hpp"
+#include "resource.hpp"
namespace cru::platform::graph {
-struct IBrush;
-struct IGeometry;
-struct ITextLayout;
struct IPainter : virtual INativeResource {
virtual Matrix GetTransform() = 0;
diff --git a/include/cru/platform/graph/text_layout.hpp b/include/cru/platform/graph/text_layout.hpp
index d1cfb44b..20009c0d 100644
--- a/include/cru/platform/graph/text_layout.hpp
+++ b/include/cru/platform/graph/text_layout.hpp
@@ -1,19 +1,10 @@
#pragma once
#include "resource.hpp"
-#include <memory>
#include <string>
#include <vector>
namespace cru::platform::graph {
-struct IFont;
-
-struct TextHitTestResult {
- int position;
- bool trailing;
- bool insideText;
-};
-
struct ITextLayout : virtual IGraphResource {
virtual std::string GetText() = 0;
virtual void SetText(std::string new_text) = 0;