From f03c73b27049a36a0b00918b65274366d71b2476 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 31 Jan 2023 01:19:17 +0200 Subject: doc: Fix missing quartz image surface docs --- src/cairo-quartz-image-surface.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c index 30d92d6be..b49577b8e 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; } -- cgit v1.2.1