CairoFormat::strideForWidth

(PECL cairo >= 0.1.0)
Provides an appropiate stride to use
public static int CairoFormat::strideForWidth ( int $format, int $width )

This method provides a stride value that will respect all alignment requirements of the accelerated image-rendering code within cairo.

Parameters:
format

The desired CairoFormat to use

width

The width of the image

Returns:

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

Examples:
CairoFormat::strideForWidth() example
<?php
/* ... */
?>

The above example will output something similar to:

...
doc_php
2016-02-24 15:59:31
Comments
Leave a Comment

Please login to continue.