ImageSurface.formatStrideForWidth

This function provides a stride value that will respect all alignment requirements of the accelerated image-rendering code Since 1.6

class ImageSurface
static
int
formatStrideForWidth

Parameters

format cairo_format_t

A cairo_format_t value

width int

The desired width of an image surface to be created.

Return Value

Type: int

the appropriate stride to use given the desired format and width, or -1 if either the format is invalid or the width too large.