[cairo] RFC: an cairo image operator - cairo_image()
a.g.nienhuis at gmail.com
Fri Apr 23 07:57:14 PDT 2010
Poll results so far:
I don't care:
On Tue, Apr 20, 2010 at 1:40 PM, Arjen Nienhuis <a.g.nienhuis at gmail.com>wrote:
> Implement an image operator for cairo.
> It's possible to draw an image (the contents of an Image Surface) onto a
> cairo surface with the following code:
> I'd like to propose to replace that with a single call to:
> cairo_image(cr, src, x, y, width, height);
> Both SVG and PDF have this operator but Cairo has not.
> *C Prototype:
> cairo_t *cr,
> cairo_surface_t *source_image_surface,
> double x,
> double y,
> double width,
> double height);
> 1: make a fallback wrapper like:
> ...something about EXTEND...
> 2: For SVG and PDF (PS?) backends implement it with the native image
> operators: <svg:image ...> and PDFs /Image. Now images are always pattern
> - More readable code
> - Cleaner PDF and SVG files
> - Easier to edit with external tools (Inkscape, Acrobat)
> - Processed faster by RIPs.
> - This makes better round trips through poppler and rsvg.
> - Counter: this can be done now by special casing some cairo_fill()calls.
> - Counter: this seems hard
> - Larger external API needs to be maintained
> - Counter: why implement cairo_rectangle() if you have cairo_line_to()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo