1064 lines
35 KiB
HTML
1064 lines
35 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>gimppalette</title>
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
|
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
|
|
<link rel="up" href="libgimp-data.html" title="Data Objects">
|
|
<link rel="prev" href="libgimp-gimpgradients.html" title="gimpgradients">
|
|
<link rel="next" href="libgimp-gimppalettes.html" title="gimppalettes">
|
|
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
<link rel="part" href="libgimp.html" title="Part I. GIMP Library">
|
|
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
|
|
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
|
|
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
|
|
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
|
|
<link rel="part" href="libgimpui.html" title="Part II. GIMP User Interface Library">
|
|
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
|
|
<link rel="index" href="libgimp-index.html" title="Index">
|
|
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
|
|
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
|
|
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
|
<tr valign="middle">
|
|
<td><a accesskey="p" href="libgimp-gimpgradients.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
|
<td><a accesskey="u" href="libgimp-data.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
|
<th width="100%" align="center">GIMP Library Reference Manual</th>
|
|
<td><a accesskey="n" href="libgimp-gimppalettes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
|
</tr>
|
|
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2595017" class="shortcut">Top</a>
|
|
 | 
|
|
<a href="#id2710000" class="shortcut">Description</a></nobr></td></tr>
|
|
</table>
|
|
<div class="refentry" lang="en">
|
|
<a name="libgimp-gimppalette"></a><div class="titlepage"></div>
|
|
<div class="refnamediv"><table width="100%"><tr>
|
|
<td valign="top">
|
|
<h2>
|
|
<a name="id2595017"></a><span class="refentrytitle">gimppalette</span>
|
|
</h2>
|
|
<p>gimppalette — Functions operating on a single palette.</p>
|
|
</td>
|
|
<td valign="top" align="right"></td>
|
|
</tr></table></div>
|
|
<div class="refsynopsisdiv">
|
|
<h2>Synopsis</h2>
|
|
<pre class="synopsis">
|
|
|
|
|
|
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* <a class="link" href="libgimp-gimppalette.html#gimp-palette-new">gimp_palette_new</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* <a class="link" href="libgimp-gimppalette.html#gimp-palette-duplicate">gimp_palette_duplicate</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* <a class="link" href="libgimp-gimppalette.html#gimp-palette-rename">gimp_palette_rename</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *new_name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-delete">gimp_palette_delete</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-get-info">gimp_palette_get_info</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> *num_colors);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-get-columns">gimp_palette_get_columns</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-set-columns">gimp_palette_set_columns</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> columns);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-add-entry">gimp_palette_add_entry</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *entry_name,
|
|
const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> *entry_num);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-delete-entry">gimp_palette_delete_entry</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-entry-get-color">gimp_palette_entry_get_color</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-entry-set-color">gimp_palette_entry_set_color</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-entry-get-name">gimp_palette_entry_get_name</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> **entry_name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-entry-set-name">gimp_palette_entry_set_name</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *entry_name);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-get-foreground">gimp_palette_get_foreground</a> (<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *foreground);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-get-background">gimp_palette_get_background</a> (<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *background);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-set-foreground">gimp_palette_set_foreground</a> (const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *foreground);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-set-background">gimp_palette_set_background</a> (const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *background);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-set-default-colors">gimp_palette_set_default_colors</a> (void);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-swap-colors">gimp_palette_swap_colors</a> (void);
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> <a class="link" href="libgimp-gimppalette.html#gimp-palette-is-editable">gimp_palette_is_editable</a> (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2710000"></a><h2>Description</h2>
|
|
<p>
|
|
Functions operating on a single palette.
|
|
</p>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2710015"></a><h2>Details</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2710026"></a><h3>
|
|
<a name="gimp-palette-new"></a>gimp_palette_new ()</h3>
|
|
<a class="indexterm" name="id2710039"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* gimp_palette_new (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);</pre>
|
|
<p>
|
|
Creates a new palette
|
|
</p>
|
|
<p>
|
|
This procedure creates a new, uninitialized palette</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The requested name of the new palette.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> The actual new palette name.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2712726"></a><h3>
|
|
<a name="gimp-palette-duplicate"></a>gimp_palette_duplicate ()</h3>
|
|
<a class="indexterm" name="id2712740"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* gimp_palette_duplicate (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);</pre>
|
|
<p>
|
|
Duplicates a palette
|
|
</p>
|
|
<p>
|
|
This procedure creates an identical palette by a different name</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> The name of the palette's copy.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2712810"></a><h3>
|
|
<a name="gimp-palette-rename"></a>gimp_palette_rename ()</h3>
|
|
<a class="indexterm" name="id2712823"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a>* gimp_palette_rename (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *new_name);</pre>
|
|
<p>
|
|
Rename a palette
|
|
</p>
|
|
<p>
|
|
This procedure renames a palette</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>new_name</code></em> :</span></p></td>
|
|
<td> The new name of the palette.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> The actual new name of the palette.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2712913"></a><h3>
|
|
<a name="gimp-palette-delete"></a>gimp_palette_delete ()</h3>
|
|
<a class="indexterm" name="id2712926"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_delete (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);</pre>
|
|
<p>
|
|
Deletes a palette
|
|
</p>
|
|
<p>
|
|
This procedure deletes a palette</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2712995"></a><h3>
|
|
<a name="gimp-palette-get-info"></a>gimp_palette_get_info ()</h3>
|
|
<a class="indexterm" name="id2713008"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_get_info (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> *num_colors);</pre>
|
|
<p>
|
|
Retrieve information about the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure retrieves information about the specified palette.
|
|
This includes the name, and the number of colors.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>num_colors</code></em> :</span></p></td>
|
|
<td> The number of colors in the palette.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2688934"></a><h3>
|
|
<a name="gimp-palette-get-columns"></a>gimp_palette_get_columns ()</h3>
|
|
<a class="indexterm" name="id2688948"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> gimp_palette_get_columns (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);</pre>
|
|
<p>
|
|
Retrieves the number of columns to use to display this palette
|
|
</p>
|
|
<p>
|
|
This procedures retrieves the prefered number of columns to use when
|
|
the palette is being displayed.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> The number of columns used to display this palette.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.4
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2689021"></a><h3>
|
|
<a name="gimp-palette-set-columns"></a>gimp_palette_set_columns ()</h3>
|
|
<a class="indexterm" name="id2689034"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_set_columns (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> columns);</pre>
|
|
<p>
|
|
Sets the number of columns to use when displaying the palette
|
|
</p>
|
|
<p>
|
|
This procedures allows to control how many colors are shown per row
|
|
when the palette is being displayed. This value can only be changed
|
|
if the palette is writable. The maximum allowed value is 64.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>columns</code></em> :</span></p></td>
|
|
<td> The new number of columns.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.4
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2689129"></a><h3>
|
|
<a name="gimp-palette-add-entry"></a>gimp_palette_add_entry ()</h3>
|
|
<a class="indexterm" name="id2689142"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_add_entry (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *entry_name,
|
|
const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> *entry_num);</pre>
|
|
<p>
|
|
Adds a palette entry to the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure adds an entry to the specifed palette. It returns an
|
|
error if the entry palette does not exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_name</code></em> :</span></p></td>
|
|
<td> The name of the entry.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
|
|
<td> The new entry's color color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The index of the added entry.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2689277"></a><h3>
|
|
<a name="gimp-palette-delete-entry"></a>gimp_palette_delete_entry ()</h3>
|
|
<a class="indexterm" name="id2689291"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_delete_entry (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num);</pre>
|
|
<p>
|
|
Deletes a palette entry from the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure deletes an entry from the specifed palette. It
|
|
returns an error if the entry palette does not exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The index of the added entry.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717262"></a><h3>
|
|
<a name="gimp-palette-entry-get-color"></a>gimp_palette_entry_get_color ()</h3>
|
|
<a class="indexterm" name="id2717275"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_entry_get_color (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color);</pre>
|
|
<p>
|
|
Gets the specified palette entry from the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure retrieves the color of the zero-based entry specifed
|
|
for the specified palette. It returns an error if the entry does not
|
|
exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The entry to retrieve.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
|
|
<td> The color requested.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717380"></a><h3>
|
|
<a name="gimp-palette-entry-set-color"></a>gimp_palette_entry_set_color ()</h3>
|
|
<a class="indexterm" name="id2717392"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_entry_set_color (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *color);</pre>
|
|
<p>
|
|
Sets the specified palette entry in the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure sets the color of the zero-based entry specifed for
|
|
the specified palette. It returns an error if the entry does not
|
|
exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The entry to retrieve.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
|
|
<td> The new color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717497"></a><h3>
|
|
<a name="gimp-palette-entry-get-name"></a>gimp_palette_entry_get_name ()</h3>
|
|
<a class="indexterm" name="id2717509"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_entry_get_name (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> **entry_name);</pre>
|
|
<p>
|
|
Gets the specified palette entry from the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure retrieves the name of the zero-based entry specifed
|
|
for the specified palette. It returns an error if the entry does not
|
|
exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The entry to retrieve.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_name</code></em> :</span></p></td>
|
|
<td> The name requested.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717614"></a><h3>
|
|
<a name="gimp-palette-entry-set-name"></a>gimp_palette_entry_set_name ()</h3>
|
|
<a class="indexterm" name="id2717627"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_entry_set_name (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name,
|
|
<a
|
|
href="../glib/glib-Basic-Types.html#gint"
|
|
>gint</a> entry_num,
|
|
const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *entry_name);</pre>
|
|
<p>
|
|
Sets the specified palette entry in the specified palette.
|
|
</p>
|
|
<p>
|
|
This procedure sets the name of the zero-based entry specifed for
|
|
the specified palette. It returns an error if the entry does not
|
|
exist.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></p></td>
|
|
<td> The entry to retrieve.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>entry_name</code></em> :</span></p></td>
|
|
<td> The new name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.2
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717731"></a><h3>
|
|
<a name="gimp-palette-get-foreground"></a>gimp_palette_get_foreground ()</h3>
|
|
<a class="indexterm" name="id2717744"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_get_foreground (<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *foreground);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_get_foreground</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Get the current GIMP foreground color.
|
|
</p>
|
|
<p>
|
|
This procedure retrieves the current GIMP foreground color. The
|
|
foreground color is used in a variety of tools such as paint tools,
|
|
blending, and bucket fill.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>foreground</code></em> :</span></p></td>
|
|
<td> The foreground color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717815"></a><h3>
|
|
<a name="gimp-palette-get-background"></a>gimp_palette_get_background ()</h3>
|
|
<a class="indexterm" name="id2717827"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_get_background (<a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *background);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_get_background</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Get the current GIMP background color.
|
|
</p>
|
|
<p>
|
|
This procedure retrieves the current GIMP background color. The
|
|
background color is used in a variety of tools such as blending,
|
|
erasing (with non-alpha images), and image filling.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>background</code></em> :</span></p></td>
|
|
<td> The background color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717899"></a><h3>
|
|
<a name="gimp-palette-set-foreground"></a>gimp_palette_set_foreground ()</h3>
|
|
<a class="indexterm" name="id2717911"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_set_foreground (const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *foreground);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_set_foreground</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Set the current GIMP foreground color.
|
|
</p>
|
|
<p>
|
|
This procedure sets the current GIMP foreground color. After this is
|
|
set, operations which use foreground such as paint tools, blending,
|
|
and bucket fill will use the new value.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>foreground</code></em> :</span></p></td>
|
|
<td> The foreground color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2717983"></a><h3>
|
|
<a name="gimp-palette-set-background"></a>gimp_palette_set_background ()</h3>
|
|
<a class="indexterm" name="id2717995"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_set_background (const <a
|
|
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
|
|
>GimpRGB</a> *background);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_set_background</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Set the current GIMP background color.
|
|
</p>
|
|
<p>
|
|
This procedure sets the current GIMP background color. After this is
|
|
set, operations which use background such as blending, filling
|
|
images, clearing, and erasing (in non-alpha images) will use the new
|
|
value.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>background</code></em> :</span></p></td>
|
|
<td> The background color.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2718067"></a><h3>
|
|
<a name="gimp-palette-set-default-colors"></a>gimp_palette_set_default_colors ()</h3>
|
|
<a class="indexterm" name="id2718079"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_set_default_colors (void);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_set_default_colors</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Set the current GIMP foreground and background colors to black and
|
|
white.
|
|
</p>
|
|
<p>
|
|
This procedure sets the current GIMP foreground and background
|
|
colors to their initial default values, black and white.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody><tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr></tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2718133"></a><h3>
|
|
<a name="gimp-palette-swap-colors"></a>gimp_palette_swap_colors ()</h3>
|
|
<a class="indexterm" name="id2718146"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_swap_colors (void);</pre>
|
|
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
|
<h3 class="title">Warning</h3>
|
|
<p><code class="literal">gimp_palette_swap_colors</code> is deprecated and should not be used in newly-written code.</p>
|
|
</div>
|
|
<p>
|
|
Swap the current GIMP foreground and background colors.
|
|
</p>
|
|
<p>
|
|
This procedure swaps the current GIMP foreground and background
|
|
colors, so that the new foreground color becomes the old background
|
|
color and vice versa.</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody><tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE on success.
|
|
</td>
|
|
</tr></tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2718200"></a><h3>
|
|
<a name="gimp-palette-is-editable"></a>gimp_palette_is_editable ()</h3>
|
|
<a class="indexterm" name="id2718212"></a><pre class="programlisting"><a
|
|
href="../glib/glib-Basic-Types.html#gboolean"
|
|
>gboolean</a> gimp_palette_is_editable (const <a
|
|
href="../glib/glib-Basic-Types.html#gchar"
|
|
>gchar</a> *name);</pre>
|
|
<p>
|
|
Tests if palette can be edited
|
|
</p>
|
|
<p>
|
|
Returns TRUE if you have permission to change the palette</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
|
<td> The palette name.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
|
<td> TRUE if the palette can be edited.
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p class="since">Since GIMP 2.4
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|