~ubuntu-branches/ubuntu/trusty/rgtk2/trusty

« back to all changes in this revision

Viewing changes to man/cairoFormatStrideForWidth.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-03 11:35:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101103113546-a7fi7jdxdebp0tw1
Tags: 2.20.1-1
* New upstream release

* debian/control: Set (Build-)Depends: to current R version
* debian/control: Set Standards-Version: to current version 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
within cairo. Typical usage will be of the form:}
7
7
\usage{cairoFormatStrideForWidth(format, width)}
8
8
\arguments{
9
 
\item{\verb{format}}{[\verb{\link{CairoFormat}}]  A \verb{\link{CairoFormat}} value}
 
9
\item{\verb{format}}{[\code{\link{CairoFormat}}]  A \code{\link{CairoFormat}} value}
10
10
\item{\verb{width}}{[integer]  The desired width of an image surface to be created.}
11
11
}
12
 
\details{\preformatted{int stride;
13
 
unsigned char *data;
14
 
  cairo_surface_t   *surface;
15
 
 
16
 
stride = cairo_format_stride_for_width (format, width);
17
 
data = malloc (stride * height);
18
 
surface = cairo_image_surface_create_for_data (data, format,
19
 
                                          width, height);
 
12
\details{\preformatted{
 
13
stride <- format$strideForWidth(width)
 
14
data <- raw(stride * height)
 
15
surface <- cairoImageSurfaceCreateForData(data, format, width, height, stride)
20
16
}  
21
 
 
22
 
  Since  1.6}
 
17
  Since 1.6}
23
18
\value{[integer]  the appropriate stride to use given the desired
24
 
format and width.}
 
19
format and width, or -1 if either the format is invalid or the width
 
20
too large.}
25
21
\author{Derived by RGtkGen from GTK+ documentation}
26
22
\keyword{internal}