[cairo] Images with stride == width?

Ian Britten britten at caris.com
Tue Jan 20 06:44:01 PST 2009


Damian Frank wrote:
> *bump*
> 
> I'd like to know the answer to this, too.  Can anyone comment?
> 
> (I recall browsing the source suggested to me that I was fine for now,
> but future revisions could break my code.  Is this accurate?)

[ Sorry for the delay - Been upgrading my computer... ]

Having now tried this, I can report that you'll simply get a
CAIRO_STATUS_INVALID_STRIDE error if you try this.

As such, it seems that you cannot make an image surface from an
existing block of image data, and will always have to create a
new buffer (Using the calculated stride), and copy your source
data into the temporary buffer (And then create the image surface
using that temporary buffer).

Anyone have any contradictions/clarifications?
Ian



More information about the cairo mailing list