This function provides a stride value that will respect all
alignment requirements of the accelerated image-rendering code
within cairo. Typical usage will be of the form:
<informalexample><programlisting>
int stride;
unsigned char *data;
cairo_surface_t *surface;
stride = cairo_format_stride_for_width (format, width);
data = malloc (stride * height);
surface = cairo_image_surface_create_for_data (data, format,
width, height,
stride);
</programlisting></informalexample>
This function provides a stride value that will respect all alignment requirements of the accelerated image-rendering code within cairo. Typical usage will be of the form:
<informalexample><programlisting> int stride; unsigned char *data; cairo_surface_t *surface;
stride = cairo_format_stride_for_width (format, width); data = malloc (stride * height); surface = cairo_image_surface_create_for_data (data, format, width, height, stride); </programlisting></informalexample>