cairo + brush

rndfax <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hello, everyone!

I want to make brush with custom RGBA template and cairo looks pretty tasty for this.
But I want some specific functions which I haven't figured out yet how to implement it using cairo.

Here is example code:
...
        brush = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, w, h, s);
        surface = cairo_image_surface_create_for_data(datas, CAIRO_FORMAT_ARGB32, ws, hs, ss);

        cr = cairo_create(surface);

        cairo_set_source_surface(cr, brush, 0.5, 77.3);
        cairo_paint(cr);

        cairo_destroy(cr);
...

Questions.

1) Can cairo composite two surfaces like glBlendEquation(GL_MAX) (e.g. result_alpha = max(source_alpha, dest_alpha), result_color = max(source_color, dest_color))?
Can this be somehow reached maybe with alternative ways?

2) Can cairo draw surface along the line so that it is looked like brush stroke?
Or I should process my own line and call cairo_set_source_surface(cr, p, x, y) + cairo_paint(cr) on every point I want?
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.