summaryrefslogtreecommitdiff
path: root/src/cairo-quartz-image-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-02-08 09:53:29 +0000
committerAdrian Johnson <ajohnson@redneon.com>2023-02-08 09:53:29 +0000
commitcae2376dd09721548b7fd8de11d847f792121d91 (patch)
tree9540bf38814e61271c1027e74caec2e42904d142 /src/cairo-quartz-image-surface.c
parenta23af71c9d0d9cae1a3f7f117415195b3f76e4a5 (diff)
parentbd608ab72c3d0fac64af98cf15d4937d24c90ec7 (diff)
downloadcairo-cae2376dd09721548b7fd8de11d847f792121d91.tar.gz
Merge branch 'doc-fixes' into 'master'
More random doc fixes See merge request cairo/cairo!437
Diffstat (limited to 'src/cairo-quartz-image-surface.c')
-rw-r--r--src/cairo-quartz-image-surface.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c
index 2c82ef1a3..e05523459 100644
--- a/src/cairo-quartz-image-surface.c
+++ b/src/cairo-quartz-image-surface.c
@@ -377,15 +377,27 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface)
}
+/**
+ * cairo_quartz_image_surface_get_image:
+ * @surface: a #cairo_surface_t
+ *
+ * Returns a #cairo_surface_t image surface that refers to the same bits
+ * as the image of the quartz surface.
+ *
+ * Return value: a #cairo_surface_t (owned by the quartz #cairo_surface_t),
+ * or %NULL if the quartz surface is not an image surface.
+ *
+ * Since: 1.6
+ */
cairo_surface_t *
-cairo_quartz_image_surface_get_image (cairo_surface_t *asurface)
+cairo_quartz_image_surface_get_image (cairo_surface_t *surface)
{
- cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t*) asurface;
+ cairo_quartz_image_surface_t *qsurface = (cairo_quartz_image_surface_t*) surface;
/* Throw an error for a non-quartz surface */
- if (! _cairo_surface_is_quartz (asurface)) {
+ if (! _cairo_surface_is_quartz (surface)) {
return SURFACE_ERROR_TYPE_MISMATCH;
}
- return (cairo_surface_t*) surface->imageSurface;
+ return (cairo_surface_t*) qsurface->imageSurface;
}