aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/cairo
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-24 23:14:45 +0800
committercrupest <crupest@outlook.com>2022-05-24 23:14:45 +0800
commitad4f06c133dc0475ef6a98cac0fa97f6e0527bf1 (patch)
tree63b07dc8674afd7ec99380e121eca0f1762ae11e /include/cru/platform/graphics/cairo
parentae0694c91602fa1cd278394132bc1320c00deba8 (diff)
downloadcru-ad4f06c133dc0475ef6a98cac0fa97f6e0527bf1.tar.gz
cru-ad4f06c133dc0475ef6a98cac0fa97f6e0527bf1.tar.bz2
cru-ad4f06c133dc0475ef6a98cac0fa97f6e0527bf1.zip
...
Diffstat (limited to 'include/cru/platform/graphics/cairo')
-rw-r--r--include/cru/platform/graphics/cairo/Base.h10
-rw-r--r--include/cru/platform/graphics/cairo/CairoGeometry.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/include/cru/platform/graphics/cairo/Base.h b/include/cru/platform/graphics/cairo/Base.h
index 7e8eeaa1..a776f90c 100644
--- a/include/cru/platform/graphics/cairo/Base.h
+++ b/include/cru/platform/graphics/cairo/Base.h
@@ -9,3 +9,13 @@
#else
#define CRU_PLATFORM_GRAPHICS_CAIRO_API
#endif
+
+#include <cairo/cairo.h>
+
+#include "../Base.h"
+
+namespace cru::platform::graphics::cairo {
+cairo_matrix_t CRU_PLATFORM_GRAPHICS_CAIRO_API Convert(const Matrix& matrix);
+Matrix CRU_PLATFORM_GRAPHICS_CAIRO_API Convert(const cairo_matrix_t* matrix);
+Matrix CRU_PLATFORM_GRAPHICS_CAIRO_API Convert(const cairo_matrix_t& matrix);
+} // namespace cru::platform::graphics::cairo
diff --git a/include/cru/platform/graphics/cairo/CairoGeometry.h b/include/cru/platform/graphics/cairo/CairoGeometry.h
index 0ddedba4..f8391670 100644
--- a/include/cru/platform/graphics/cairo/CairoGeometry.h
+++ b/include/cru/platform/graphics/cairo/CairoGeometry.h
@@ -9,7 +9,8 @@ class CRU_PLATFORM_GRAPHICS_CAIRO_API CairoGeometry : public CairoResource,
public virtual IGeometry {
public:
CairoGeometry(CairoGraphicsFactory* factory, cairo_path_t* cairo_path,
- bool auto_destroy);
+ const Matrix& transform = Matrix::Identity(),
+ bool auto_destroy = true);
~CairoGeometry();
bool FillContains(const Point& point) override;
@@ -21,6 +22,7 @@ class CRU_PLATFORM_GRAPHICS_CAIRO_API CairoGeometry : public CairoResource,
private:
cairo_path_t* cairo_path_;
+ Matrix transform_;
bool auto_destroy_;
};