[cairo] Re: Embeding JPG in PDF

Bill Spitzak spitzak at d2.com
Fri Jan 12 16:26:28 PST 2007

Aren't there already immutable surfaces in cairo, such as solid colors? 
Or the gradients?

The image should be whatever class can be passed to cairo_set_source. If 
this is a surface, then attempts to draw into it can produce errors.

Baz wrote:
> [various API options discussed]
> I'm not suggesting you follow it, but its worth at least looking at
> the equivalent api in Quartz, CGImage:
> http://developer.apple.com/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html 
> Quartz makes a distinction between this kind of bitmap, which is
> immutable and created from jpg/png/bitmap data, and the
> cairo_image_surface_t equivalent (CGBitmapContext). Images are copied
> unchanged into their destination if possible or rendered into a bitmap
> first if they can't. The API is suggestive of some CGImages internally
> having a rectangular clip (so cropped images don't require
> decompression).

More information about the cairo mailing list