[cairo] Images with stride == width?

Damian Frank damian.frank at gmail.com
Mon Jan 19 19:41:30 PST 2009


*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?)

Damian


On Thu, Jan 15, 2009 at 12:42 PM, Ian Britten <britten at caris.com> wrote:
> Hi all,
> The docs for cairo_image_surface_create_for_data() state that
> cairo_format_stride_for_width() should always be used for for
> the 'stride' parameter.
>
> If I have external image data that I'm trying to pass into
> cairo_image_surface_create_for_data(), can I set the stride
> equal to the width (thus contradicting the docs)?
>
> The external image data has no padding/stride in it, and I'm
> trying to figure out if I can pass it in directly as it is, or
> if I have to copy it into another buffer (which was allocated
> with the calculated stride value).
>
> Thanks for any clarification!
> Ian
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list