Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cairoFormatStrideForWidth

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

stride <- format$strideForWidth(width)
data <- raw(stride * height)
surface <- cairoImageSurfaceCreateForData(data, format, width, height, stride)

Since 1.6

Value

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

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.