common->alpha_map = NULL;
common->component_alpha = FALSE;
common->ref_count = 1;
+ common->read_func = NULL;
+ common->write_func = NULL;
}
return image;
#define SCANLINE_BUFFER_LENGTH 2048
void
+pixman_image_set_accessors (pixman_image_t *image,
+ pixman_read_memory_func_t read_func,
+ pixman_write_memory_func_t write_func)
+{
+ return_if_fail (image != NULL);
+
+ image->common.read_func = read_func;
+ image->common.write_func = write_func;
+}
+
+void
pixman_image_composite_rect (pixman_op_t op,
pixman_image_t *src_img,
pixman_image_t *mask_img,
struct image_common
{
- image_type_t type;
- int32_t ref_count;
- pixman_region16_t clip_region;
- pixman_transform_t *transform;
- pixman_repeat_t repeat;
- pixman_filter_t filter;
- pixman_fixed_t *filter_params;
- int n_filter_params;
- bits_image_t *alpha_map;
- point_t alpha_origin;
- pixman_bool_t component_alpha;
+ image_type_t type;
+ int32_t ref_count;
+ pixman_region16_t clip_region;
+ pixman_transform_t *transform;
+ pixman_repeat_t repeat;
+ pixman_filter_t filter;
+ pixman_fixed_t *filter_params;
+ int n_filter_params;
+ bits_image_t *alpha_map;
+ point_t alpha_origin;
+ pixman_bool_t component_alpha;
+ pixman_read_memory_func_t read_func;
+ pixman_write_memory_func_t write_func;
};
struct source_image
typedef struct pixman_indexed pixman_indexed_t;
typedef struct pixman_gradient_stop pixman_gradient_stop_t;
+typedef uint32_t (* pixman_read_memory_func_t) (const void *src, int size);
+typedef void (* pixman_write_memory_func_t) (void *dst, uint32_t value, int size);
+
struct pixman_gradient_stop {
pixman_fixed_t x;
pixman_color_t color;
int16_t y);
void pixman_image_set_component_alpha (pixman_image_t *image,
pixman_bool_t component_alpha);
-
+void pixman_image_set_accessors (pixman_image_t *image,
+ pixman_read_memory_func_t read_func,
+ pixman_write_memory_func_t write_func);
/* Composite */
void pixman_image_composite_rect (pixman_op_t op,
int width,
int height);
-
-
-
-
-
-
#endif /* PIXMAN_H__ */