typedef struct fragment_t fragment_t; #define TRUE 1 #define FALSE 0 fragment_t *fragment_new_blank (int width, int height); fragment_t *fragment_new_white (int width, int height); fragment_t *fragment_new_traps (int width, int height, int n_traps, pixman_trapezoid_t *traps); fragment_t *fragment_new_glyphs (int width, int height, pixman_glyph_cache_t *cache, int n_glyphs, pixman_glyph_t *glyphs); fragment_t *fragment_new_image (int width, int height, pixman_image_t *image); fragment_t *fragment_new_region (pixman_region32_t *region); /* Creates a new fragment corresponding to the intersection of * source with destination. The content of this fragment is * (dest OP source). * * The intersection is subtracted from dest. The source is not changed * * Should probably be called "fragment_new_composite (op, dest, source)" FIXME */ fragment_t * fragment_composite (fragment_t *dest, pixman_op_t op, fragment_t *source); /* A new fragment is create that is the same as dest with the * region of other subtracted. @dest is freed (or, more likely, recycled) */ fragment_t * fragment_subtract (fragment_t *dest, fragment_t *other); pixman_bool_t fragment_apply (fragment_t *fragment, pixman_image_t *image); void fragment_free (fragment_t *fragment); pixman_bool_t fragment_is_empty (fragment_t *fragment); pixman_bool_t fragment_is_broken (fragment_t *fragment); /* Images */ typedef struct fimage_t fimage_t; fimage_t *fimage_new_blank (int width, int height); fimage_t *fimage_new_white (int width, int height); /* Takes ownership of @glyphs, but not glyph_cache */ fimage_t *fimage_new_glyphs (int width, int height, pixman_glyph_cache_t *glyph_cache, int n_glyphs, pixman_glyph_t *glyphs); /* Takes ownership of the trapezoids */ fimage_t *fimage_new_traps (int width, int height, int n_traps, pixman_trapezoid_t *traps); /* Takes ownership of the image */ fimage_t *fimage_new_image (int width, int height, pixman_image_t *image); /* Makes a copy of the region; does not take ownership */ fimage_t *fimage_new_region (int width, int height, pixman_region32_t *region); fimage_t * fimage_composite (fimage_t *dest, pixman_op_t op, fimage_t *source); void fimage_free (fimage_t *image);