? pixman.h ? src/.cairo-pattern.c.swp ? src/.cairoint.h.swp Index: src/cairo-pattern.c =================================================================== RCS file: /cvs/cairo/cairo/src/cairo-pattern.c,v retrieving revision 1.65 diff -p -u -7 -r1.65 cairo-pattern.c --- src/cairo-pattern.c 30 Aug 2005 17:42:17 -0000 1.65 +++ src/cairo-pattern.c 4 Oct 2005 12:35:37 -0000 @@ -1514,14 +1514,53 @@ _cairo_pattern_release_surface (cairo_pa } else { cairo_surface_destroy (surface); } } +/** + * _cairo_pattern_acquire_surfaces: + * @src: Source pattern + * @mask: Mask pattern. Can be null. + * @dst: Destination surface + * @src_x: X coordinate of upper-left corner of the destination area + * (in device coordinates) + * @src_y: Y coordinate of upper-left corner of the destination area + * (in device coordinates) + * @mask_x: X coordinate of upper-left corner of the mask area + * (in device coordinates) + * @mask_y: Y coordinate of upper-left corner of the mask area + * (in device coordinates) + * @width: Width of the area to composite upon (device coords) + * @height: Height of the area to composite upon (device coords) + * @src_out: Source surface for compositing + * @mask_out: Mask surface for compositing; can be null. + * @src_attributes: Attributes for the source surface. + * @mask_attributes: Attributes for the mask surface. + * + * Acquires surfaces for a pattern. This can be used each time a surface + * backend wants to implement a composite operation for a pattern. + * + * The returned surfaces match the result of dst->clone_similar (if + * available). The returned surfaces should then be composited on the + * destination surface according to the returned attributes: + * - The surfaces should be transformed according to attr->matrix + * using the filter from attr->filter + * - x_offset and y_offset should be added to src_x/mask_x and src_y/mask_y + * and used as the upperleft corner of the destination rect + * - The surface should be composited to the resulting area, taking the extend + * attribute into account. + * + * attr->acquired and attr->extra can be ignored; they are only used by + * _cairo_pattern_release_surface. + * + * The returned matrix will not be an integer translation; it will be the + * identity matrix or a more complex transformation than an integer translate. + **/ cairo_int_status_t _cairo_pattern_acquire_surfaces (cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, int src_x, int src_y, int mask_x, Index: src/cairoint.h =================================================================== RCS file: /cvs/cairo/cairo/src/cairoint.h,v retrieving revision 1.211 diff -p -u -7 -r1.211 cairoint.h --- src/cairoint.h 19 Sep 2005 21:24:00 -0000 1.211 +++ src/cairoint.h 4 Oct 2005 12:35:37 -0000 @@ -746,28 +746,32 @@ typedef struct _cairo_format_masks { unsigned long green_mask; unsigned long blue_mask; } cairo_format_masks_t; struct _cairo_surface { const cairo_surface_backend_t *backend; + // All data members here are interpreted by cairo-surface.c and can be + // ignored by backend implementors. Especially, device_*_offset is added + // before the backend functions are called; similarly, the caller of the + // clip functions sets the clip serials. unsigned int ref_count; cairo_status_t status; cairo_bool_t finished; cairo_user_data_array_t user_data; double device_x_offset; double device_y_offset; double device_x_scale; double device_y_scale; /* * Each time a clip region is modified, it gets the next value in this * sequence. This means that clip regions for this surface are uniquely - * identified andupdates to the clip can be readily identified + * identified and updates to the clip can be readily identified */ unsigned int next_clip_serial; /* * The serial number of the current clip. This is set when * the surface clipping is set. The gstate can then cheaply * check whether the surface clipping is already correct before * performing a rendering operation. @@ -898,14 +902,16 @@ typedef union { typedef struct _cairo_surface_attributes { cairo_matrix_t matrix; cairo_extend_t extend; cairo_filter_t filter; int x_offset; int y_offset; + + /* private: */ cairo_bool_t acquired; void *extra; } cairo_surface_attributes_t; typedef struct _cairo_traps { cairo_trapezoid_t *traps; int num_traps;