gdkRgbFindColor: gdkRgbFindColor

Description Usage Arguments Details Author(s)

View source: R/gdkFuncs.R

Description

colormap should be the colormap for the graphics context and drawable you're using to draw. If you're drawing to a GtkWidget, call gtkWidgetGetColormap.

Usage

1
gdkRgbFindColor(colormap, color)

Arguments

colormap

a GdkColormap

color

a GdkColor

Details

color should have its red, green, and blue fields initialized; gdkRgbFindColor will fill in the pixel field with the best matching pixel from a color cube. The color is then ready to be used for drawing, e.g. you can call gdkGCSetForeground which expects pixel to be initialized.

In many cases, you can avoid this whole issue by calling gdkGCSetRgbFgColor or gdkGCSetRgbBgColor, which do not expect pixel to be initialized in advance. If you use those functions, there's no need for gdkRgbFindColor.

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to gdkRgbFindColor in RGtk2...