cairoFormatStrideForWidth       package:RGtk2       R Documentation

_c_a_i_r_o_F_o_r_m_a_t_S_t_r_i_d_e_F_o_r_W_i_d_t_h

_D_e_s_c_r_i_p_t_i_o_n:

     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:

_U_s_a_g_e:

     cairoFormatStrideForWidth(format, width)

_A_r_g_u_m_e_n_t_s:

'format': ['CairoFormat']  A 'CairoFormat' value

 'width': [integer]  The desired width of an image surface to be
          created.

_D_e_t_a_i_l_s:

     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

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

