cairoFormatStrideForWidth {RGtk2}R Documentation

cairoFormatStrideForWidth

Description

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:

Usage

cairoFormatStrideForWidth(format, width)

Arguments

format [CairoFormat] A CairoFormat value
width [integer] The desired width of an image surface to be created.

Details

int stride;
unsigned char *data;
  CairoSurface   *surface;

stride = cairo_format_stride_for_width (format, width);
data = malloc (stride * height);
surface = cairo_image_surface_create_for_data (data, format,
                                          width, height);

Since 1.6

Value

[integer] the appropriate stride to use given the desired format and width.

Author(s)

Derived by RGtkGen from GTK+ documentation


[Package RGtk2 version 2.12.15 Index]