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

« back to all changes in this revision

Viewing changes to man/gdk-GdkRGB.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:
25
25
\code{\link{gdkRgbSetVerbose}(verbose)}\cr
26
26
}
27
27
\section{Detailed Description}{GdkRGB is a low-level module which renders RGB, grayscale, and indexed
28
 
colormap images to a \verb{\link{GdkDrawable}}. It does this as efficiently as
 
28
colormap images to a \code{\link{GdkDrawable}}. It does this as efficiently as
29
29
possible, handling issues such as colormaps, visuals, dithering,
30
30
temporary buffers, and so on. Most code should use the higher-level
31
 
\verb{\link{GdkPixbuf}} features in place of this module; for example,
 
31
\code{\link{GdkPixbuf}} features in place of this module; for example,
32
32
\code{\link{gdkDrawPixbuf}} uses GdkRGB in its implementation.
33
33
  
34
34
GdkRGB allocates a color cube to use when rendering images.  You can
40
40
colormap, and setting it to 216 means that it always creates a private
41
41
one if it cannot allocate the 6x6x6 colormap in the default. If you
42
42
always want a private colormap (to avoid consuming too many colormap
43
 
entries for other apps, say), you can use 
 
43
entries for other apps, say), you can use
44
44
\code{gdk_rgb_set_install(TRUE)}.
45
45
Setting the value greater than 216 exercises a bug in older versions
46
46
of GdkRGB. Note, however, that setting it to 0 doesn't let you get
71
71
  # Set up the RGB buffer.
72
72
  x <- rep(0:(IMAGE_WIDTH-1), IMAGE_HEIGHT)
73
73
  y <- rep(0:(IMAGE_HEIGHT-1), IMAGE_WIDTH, each = T)
74
 
  red <- x - x \%\% 32
75
 
  green <- (x / 32) * 4 + y - y \%\% 32
76
 
  blue <- y - y \%\% 32
 
74
  red <- x - x \%% 32
 
75
  green <- (x / 32) * 4 + y - y \%% 32
 
76
  blue <- y - y \%% 32
77
77
  buf <- rbind(red, green, blue)
78
78
  
79
79
  # connect to expose event
96
96
\strong{\verb{GdkRgbCmap} is a \link{transparent-type}.}
97
97
 
98
98
\describe{
99
 
\item{\code{colors}}{[numeric] The colors, represented as 0xRRGGBB integer values.}
100
 
\item{\code{n_colors}}{[integer] The number of colors in the cmap.}
 
99
\item{\code{colors}}{The colors, represented as 0xRRGGBB integer values.}
 
100
\item{\code{n_colors}}{The number of colors in the cmap.}
101
101
}
102
102
 
103
103
}}}
104
104
\section{Enums and Flags}{\describe{\item{\verb{GdkRgbDither}}{
105
105
Selects whether or not GdkRGB applies dithering
106
 
to the image on display. 
 
106
to the image on display.
107
107
  
108
108
Since GdkRGB currently only handles images with 8 bits per component,
109
109
dithering on 24 bit per pixel displays is a moot point.
116
116
}
117
117
 
118
118
}}}
119
 
\references{\url{http://developer.gnome.org/doc/API/2.0/gdk/gdk-GdkRGB.html}}
 
119
\references{\url{http://library.gnome.org/devel//gdk/gdk-GdkRGB.html}}
120
120
\author{Derived by RGtkGen from GTK+ documentation}
121
121
\keyword{internal}