static extern bool gimp_image_pick_color(Int32 image_ID, Int32 drawable_ID, double x, double y, bool sample_merged, bool sample_average, double average_radius, out GimpRGB color);
static extern bool gimp_by_color_select(Int32 drawable_ID, ref GimpRGB color, int threshold, ChannelOps operation, bool antialias, bool feather, double feather_radius, bool sample_merged);
public RGB SegmentGetLeftColor(int segment, out double opacity) { var rgb = new GimpRGB(); if (!gimp_gradient_segment_get_left_color(Name, segment, out rgb, out opacity)) { throw new GimpSharpException(); } return(new RGB(rgb)); }
public PaletteEntry AddEntry(string entryName, RGB color) { GimpRGB rgb = color.GimpRGB; int entryNum; if (!gimp_palette_add_entry(Name, entryName, ref rgb, out entryNum)) { throw new GimpSharpException(); } return(new PaletteEntry(this, entryNum)); }
extern static IntPtr gimp_color_button_new(string title, int width, int height, ref GimpRGB color, ColorAreaType type);
static extern double gimp_rgb_add(ref GimpRGB rgb1, ref GimpRGB rgb2);
static extern void gimp_rgb_set_uchar(ref GimpRGB rgb, byte red, byte green, byte blue);
static extern void gimp_color_button_set_color(IntPtr button, ref GimpRGB color);
static extern byte gimp_rgb_luminance_uchar(ref GimpRGB rgb);
static extern bool gimp_rgb_parse_hex(ref GimpRGB rgb, string hex, int len);
static extern void gimp_rgb_gamma(ref GimpRGB rgb, double gamma);
static extern double gimp_rgb_distance(ref GimpRGB rgb1, ref GimpRGB rgb2);
static extern double gimp_rgb_min(ref GimpRGB rgb);
static extern void gimp_rgb_clamp(ref GimpRGB rgb);
static extern void gimp_rgb_multiply(ref GimpRGB rgb, double factor);
static extern double gimp_rgb_subtract(ref GimpRGB rgb1, ref GimpRGB rgb2);
static extern void gimp_cmyk_to_rgb(ref GimpCMYK cmyk, ref GimpRGB rgb);
static extern double gimp_rgb_luminance(ref GimpRGB rgb);
static extern void gimp_rgb_get_uchar(ref GimpRGB rgb, out byte red, out byte green, out byte blue);
internal RGB(GimpRGB rgb) { _rgb = rgb; }
static extern Int32 gimp_channel_new(Int32 image_ID, string name, int width, int height, double opacity, ref GimpRGB color);
static extern void gimp_rgb_set(ref GimpRGB rgb, double red, double green, double blue);
static extern bool gimp_channel_set_color(Int32 channel_ID, ref GimpRGB color);
internal GimpColorButton(string title, int width, int height, GimpRGB color, ColorAreaType type) : base(gimp_color_button_new(title, width, height, ref color, type)) { }
extern static void gimp_color_button_get_color(IntPtr button, ref GimpRGB color);
static extern bool gimp_rgb_parse_css(ref GimpRGB rgb, string css, int len);
static extern void gimp_pixel_fetcher_set_bg_color(IntPtr pf, ref GimpRGB color);
static extern bool gimp_palette_add_entry(string name, string entry_name, ref GimpRGB color, out int entry_num);
static extern bool gimp_palette_entry_set_color(string name, int entry_num, GimpRGB color);
static extern bool gimp_gradient_segment_get_left_color(string name, int segment, out GimpRGB color, out double opacity);
static extern void gimp_hsv_to_rgb(ref GimpHSV hsv, ref GimpRGB rgb);
static extern bool gimp_gradient_segment_set_right_color(string name, int segment, ref GimpRGB color, double opacity);
static extern bool gimp_context_get_foreground(out GimpRGB foreground);
static extern bool gimp_context_set_foreground(ref GimpRGB foreground);
static extern bool gimp_context_get_background(out GimpRGB background);
static extern bool gimp_context_set_background(ref GimpRGB background);
static extern bool gimp_rgb_parse_name(ref GimpRGB rgb, IntPtr name, int len);
static extern void gimp_rgb_set_alpha(ref GimpRGB rgb, double alpha);
static extern IntPtr gimp_color_button_new(string title, int width, int height, ref GimpRGB color, ColorAreaType type);
// Private (!) constructor so we can pass rgb by reference Channel(Image image, string name, int width, int height, double opacity, GimpRGB rgb) : base(gimp_channel_new(image.ID, name, width, height, opacity, ref rgb)) { }