Package: cairo
Function cairo-format-stride-for-width
Lambda Listcairo-format-stride-for-width (format width) ArgumentsReturn Value
The appropriate stride to use given the desired format and width, or -1
if either the format is invalid or the width too large. Details
This function provides a stride value that will respect all alignment
requirements of the accelerated image-rendering code within Cairo. Example
(let* ((height 150)
(width 200)
(stride (cairo-format-stride-for-width :argb32 width))
(data (g-malloc (* height stride)))
(surface (cairo-image-surface-create-for-data data
:argb32
width height stride)))
... ) | See also |
2020-12-21