[cairo] dithering in cairo ?
Marc Jeanmougin
marc at jeanmougin.fr
Fri Jun 14 15:53:44 UTC 2019
Hi all,
I'm interested in being able to create dithered images in Inkscape (it
would be useful in a lot of other contexts).
A dithering path has been recently added into pixman which makes it
possible, but I'm struggling on what would be the best way :
At first I thought that I could do the same as what is done with
cairo_filter_t at the pattern level : "just"
cairo_pattern_get/set_filter (
https://gitlab.freedesktop.org/cairo/cairo/merge_requests/24/diffs?commit_id=730a268b90a60bf050b42505801bc6bc085af759
).
However this seems to be not enough : when creating a
cairo_image_surface with pixman format, the code directly creates the
pixman_image but I get no direct access to it. I'm also not exactly sure
what would happen with the surfaces created with push_group().
I'm not sure where to go from here: I was thinking about either add a
cairo_image_surface_get_pixman_image to let the user deal directly with
it at the pixman level, or having something like
pixman_image_surface_set_dither().
Could you give me some advice on where to go from here?
Thanks a lot,
--
Marc Jeanmougin
More information about the cairo
mailing list