summaryrefslogtreecommitdiffstats
path: root/src/display/cairo-utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/display/cairo-utils.cpp')
-rw-r--r--src/display/cairo-utils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index 36202f42e..ce56c21f5 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -367,6 +367,14 @@ ink_cairo_surface_create_identical(cairo_surface_t *s)
return ns;
}
+cairo_surface_t *
+ink_cairo_surface_create_same_size(cairo_surface_t *s, cairo_content_t c)
+{
+ cairo_surface_t *ns = cairo_surface_create_similar(s, c,
+ ink_cairo_surface_get_width(s), ink_cairo_surface_get_height(s));
+ return ns;
+}
+
/** @brief Extract the alpha channel into a new surface.
* Creates a surface with a content type of CAIRO_CONTENT_ALPHA that contains
* the alpha values of pixels from @a s. */