1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
27
* gimp_palette_get_foreground:
28
* @foreground: The foreground color.
30
* Get the current GIMP foreground color.
32
* This procedure retrieves the current GIMP foreground color. The
33
* foreground color is used in a variety of tools such as paint tools,
34
* blending, and bucket fill.
36
* Returns: TRUE on success.
39
gimp_palette_get_foreground (GimpRGB *foreground)
41
return gimp_context_get_foreground (foreground);
45
* gimp_palette_get_background:
46
* @background: The background color.
48
* Get the current GIMP background color.
50
* This procedure retrieves the current GIMP background color. The
51
* background color is used in a variety of tools such as blending,
52
* erasing (with non-alpha images), and image filling.
54
* Returns: TRUE on success.
57
gimp_palette_get_background (GimpRGB *background)
59
return gimp_context_get_background (background);
63
* gimp_palette_set_foreground:
64
* @foreground: The foreground color.
66
* Set the current GIMP foreground color.
68
* This procedure sets the current GIMP foreground color. After this is
69
* set, operations which use foreground such as paint tools, blending,
70
* and bucket fill will use the new value.
72
* Returns: TRUE on success.
75
gimp_palette_set_foreground (const GimpRGB *foreground)
77
return gimp_context_set_foreground (foreground);
81
* gimp_palette_set_background:
82
* @background: The background color.
84
* Set the current GIMP background color.
86
* This procedure sets the current GIMP background color. After this is
87
* set, operations which use background such as blending, filling
88
* images, clearing, and erasing (in non-alpha images) will use the new
91
* Returns: TRUE on success.
94
gimp_palette_set_background (const GimpRGB *background)
96
return gimp_context_set_background (background);
100
* gimp_palette_set_default_colors:
102
* Set the current GIMP foreground and background colors to black and
105
* This procedure sets the current GIMP foreground and background
106
* colors to their initial default values, black and white.
108
* Returns: TRUE on success.
111
gimp_palette_set_default_colors (void)
113
return gimp_context_set_default_colors ();
117
* gimp_palette_swap_colors:
119
* Swap the current GIMP foreground and background colors.
121
* This procedure swaps the current GIMP foreground and background
122
* colors, so that the new foreground color becomes the old background
123
* color and vice versa.
125
* Returns: TRUE on success.
128
gimp_palette_swap_colors (void)
130
return gimp_context_swap_colors ();