Files
gimp/devel-docs/libgimp/html/libgimp-gimpgradient.html
2013-02-23 11:28:27 -05:00

1354 lines
74 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimpgradient</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIMP Library Reference Manual">
<link rel="up" href="libgimp-data.html" title="Data Objects">
<link rel="prev" href="libgimp-gimpfonts.html" title="gimpfonts">
<link rel="next" href="libgimp-gimpgradients.html" title="gimpgradients">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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-gimpfonts.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-gimpgradients.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgimp-gimpgradient.synopsis" class="shortcut">Top</a>
 | 
<a href="#libgimp-gimpgradient.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgimp-gimpgradient"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimp-gimpgradient.top_of_page"></a>gimpgradient</span></h2>
<p>gimpgradient — Functions operating on a single gradient.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgimp-gimpgradient.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><span class="returnvalue">gchar</span> * <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-new" title="gimp_gradient_new ()">gimp_gradient_new</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gchar</span> * <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-duplicate" title="gimp_gradient_duplicate ()">gimp_gradient_duplicate</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gchar</span> * <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-rename" title="gimp_gradient_rename ()">gimp_gradient_rename</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *new_name</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-delete" title="gimp_gradient_delete ()">gimp_gradient_delete</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-is-editable" title="gimp_gradient_is_editable ()">gimp_gradient_is_editable</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-get-uniform-samples" title="gimp_gradient_get_uniform_samples ()">gimp_gradient_get_uniform_samples</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_samples</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> reverse</code></em>,
<em class="parameter"><code><span class="type">gint</span> *num_color_samples</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> **color_samples</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-get-custom-samples" title="gimp_gradient_get_custom_samples ()">gimp_gradient_get_custom_samples</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_samples</code></em>,
<em class="parameter"><code>const <span class="type">gdouble</span> *positions</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> reverse</code></em>,
<em class="parameter"><code><span class="type">gint</span> *num_color_samples</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> **color_samples</code></em>);
<span class="returnvalue">gint</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-get-number-of-segments" title="gimp_gradient_get_number_of_segments ()">gimp_gradient_get_number_of_segments</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-left-color" title="gimp_gradient_segment_get_left_color ()">gimp_gradient_segment_get_left_color</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *opacity</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-set-left-color" title="gimp_gradient_segment_set_left_color ()">gimp_gradient_segment_set_left_color</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> opacity</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-right-color" title="gimp_gradient_segment_get_right_color ()">gimp_gradient_segment_get_right_color</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *opacity</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-set-right-color" title="gimp_gradient_segment_set_right_color ()">gimp_gradient_segment_set_right_color</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> opacity</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-left-pos" title="gimp_gradient_segment_get_left_pos ()">gimp_gradient_segment_get_left_pos</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-set-left-pos" title="gimp_gradient_segment_set_left_pos ()">gimp_gradient_segment_set_left_pos</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-middle-pos" title="gimp_gradient_segment_get_middle_pos ()">gimp_gradient_segment_get_middle_pos</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-set-middle-pos" title="gimp_gradient_segment_set_middle_pos ()">gimp_gradient_segment_set_middle_pos</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-right-pos" title="gimp_gradient_segment_get_right_pos ()">gimp_gradient_segment_get_right_pos</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-set-right-pos" title="gimp_gradient_segment_set_right_pos ()">gimp_gradient_segment_set_right_pos</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-blending-function" title="gimp_gradient_segment_get_blending_function ()">gimp_gradient_segment_get_blending_function</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentType" title="enum GimpGradientSegmentType"><span class="type">GimpGradientSegmentType</span></a> *blend_func</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-get-coloring-type" title="gimp_gradient_segment_get_coloring_type ()">gimp_gradient_segment_get_coloring_type</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentColor" title="enum GimpGradientSegmentColor"><span class="type">GimpGradientSegmentColor</span></a> *coloring_type</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-set-blending-function" title="gimp_gradient_segment_range_set_blending_function ()">gimp_gradient_segment_range_set_blending_function</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentType" title="enum GimpGradientSegmentType"><span class="type">GimpGradientSegmentType</span></a> blending_function</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-set-coloring-type" title="gimp_gradient_segment_range_set_coloring_type ()">gimp_gradient_segment_range_set_coloring_type</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentColor" title="enum GimpGradientSegmentColor"><span class="type">GimpGradientSegmentColor</span></a> coloring_type</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-flip" title="gimp_gradient_segment_range_flip ()">gimp_gradient_segment_range_flip</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-replicate" title="gimp_gradient_segment_range_replicate ()">gimp_gradient_segment_range_replicate</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> replicate_times</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-split-midpoint" title="gimp_gradient_segment_range_split_midpoint ()">gimp_gradient_segment_range_split_midpoint</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-split-uniform" title="gimp_gradient_segment_range_split_uniform ()">gimp_gradient_segment_range_split_uniform</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> split_parts</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-delete" title="gimp_gradient_segment_range_delete ()">gimp_gradient_segment_range_delete</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-redistribute-handles" title="gimp_gradient_segment_range_redistribute_handles ()">gimp_gradient_segment_range_redistribute_handles</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-blend-colors" title="gimp_gradient_segment_range_blend_colors ()">gimp_gradient_segment_range_blend_colors</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-blend-opacity" title="gimp_gradient_segment_range_blend_opacity ()">gimp_gradient_segment_range_blend_opacity</a>
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);
<span class="returnvalue">gdouble</span> <a class="link" href="libgimp-gimpgradient.html#gimp-gradient-segment-range-move" title="gimp_gradient_segment_range_move ()">gimp_gradient_segment_range_move</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> delta</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> control_compress</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgimp-gimpgradient.description"></a><h2>Description</h2>
<p>
Functions operating on a single gradient.
</p>
</div>
<div class="refsect1">
<a name="libgimp-gimpgradient.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="gimp-gradient-new"></a><h3>gimp_gradient_new ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_gradient_new (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Creates a new gradient
</p>
<p>
This procedure creates a new, uninitialized gradient
</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 gradient.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The actual new gradient name.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gradient-duplicate"></a><h3>gimp_gradient_duplicate ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_gradient_duplicate (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Duplicates a gradient
</p>
<p>
This procedure creates an identical gradient by a different name
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The name of the gradient's copy.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gradient-rename"></a><h3>gimp_gradient_rename ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_gradient_rename (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *new_name</code></em>);</pre>
<p>
Rename a gradient
</p>
<p>
This procedure renames a gradient
</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 gradient 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 gradient.</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 gradient.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gradient-delete"></a><h3>gimp_gradient_delete ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_delete (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Deletes a gradient
</p>
<p>
This procedure deletes a gradient
</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 gradient 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">
<a name="gimp-gradient-is-editable"></a><h3>gimp_gradient_is_editable ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_is_editable (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Tests if gradient can be edited
</p>
<p>
Returns TRUE if you have permission to change the gradient
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if the gradient can be edited.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gradient-get-uniform-samples"></a><h3>gimp_gradient_get_uniform_samples ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_get_uniform_samples (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_samples</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> reverse</code></em>,
<em class="parameter"><code><span class="type">gint</span> *num_color_samples</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> **color_samples</code></em>);</pre>
<p>
Sample the specified in uniform parts.
</p>
<p>
This procedure samples the active gradient in the specified number
of uniform parts. It returns a list of floating-point values which
correspond to the RGBA values for each sample. The minimum number of
samples to take is 2, in which case the returned colors will
correspond to the { 0.0, 1.0 } positions in the gradient. For
example, if the number of samples is 3, the procedure will return
the colors at positions { 0.0, 0.5, 1.0 }.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_samples</code></em> :</span></p></td>
<td>The number of samples to take.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>reverse</code></em> :</span></p></td>
<td>Use the reverse gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_color_samples</code></em> :</span></p></td>
<td>Length of the color_samples array (4 * num_samples).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color_samples</code></em> :</span></p></td>
<td>Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.</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">
<a name="gimp-gradient-get-custom-samples"></a><h3>gimp_gradient_get_custom_samples ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_get_custom_samples (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_samples</code></em>,
<em class="parameter"><code>const <span class="type">gdouble</span> *positions</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> reverse</code></em>,
<em class="parameter"><code><span class="type">gint</span> *num_color_samples</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> **color_samples</code></em>);</pre>
<p>
Sample the spacified gradient in custom positions.
</p>
<p>
This procedure samples the active gradient in the specified number
of points. The procedure will sample the gradient in the specified
positions from the list. The left endpoint of the gradient
corresponds to position 0.0, and the right endpoint corresponds to
1.0. The procedure returns a list of floating-point values which
correspond to the RGBA values for each sample.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_samples</code></em> :</span></p></td>
<td>The number of samples to take.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>positions</code></em> :</span></p></td>
<td>The list of positions to sample along the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>reverse</code></em> :</span></p></td>
<td>Use the reverse gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_color_samples</code></em> :</span></p></td>
<td>Length of the color_samples array (4 * num_samples).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color_samples</code></em> :</span></p></td>
<td>Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.</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">
<a name="gimp-gradient-get-number-of-segments"></a><h3>gimp_gradient_get_number_of_segments ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span> gimp_gradient_get_number_of_segments
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Returns the number of segments of the specified gradient
</p>
<p>
This procedure returns the number of segments of the specified
gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Number of segments.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gradient-segment-get-left-color"></a><h3>gimp_gradient_segment_get_left_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_left_color
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *opacity</code></em>);</pre>
<p>
Retrieves the left endpoint color of the specified segment
</p>
<p>
This procedure retrieves the left endpoint color of the specified
segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>The return color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opacity</code></em> :</span></p></td>
<td>The opacity of the endpoint.</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">
<a name="gimp-gradient-segment-set-left-color"></a><h3>gimp_gradient_segment_set_left_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_set_left_color
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> opacity</code></em>);</pre>
<p>
Sets the left endpoint color of the specified segment
</p>
<p>
This procedure sets the left endpoint color of the specified segment
of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>The color to set.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opacity</code></em> :</span></p></td>
<td>The opacity to set for the endpoint.</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">
<a name="gimp-gradient-segment-get-right-color"></a><h3>gimp_gradient_segment_get_right_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_right_color
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *opacity</code></em>);</pre>
<p>
Retrieves the right endpoint color of the specified segment
</p>
<p>
This procedure retrieves the right endpoint color of the specified
segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>The return color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opacity</code></em> :</span></p></td>
<td>The opacity of the endpoint.</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">
<a name="gimp-gradient-segment-set-right-color"></a><h3>gimp_gradient_segment_set_right_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_set_right_color
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> opacity</code></em>);</pre>
<p>
Sets the right endpoint color of the specified segment
</p>
<p>
This procedure sets the right endpoint color of the specified
segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>The color to set.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opacity</code></em> :</span></p></td>
<td>The opacity to set for the endpoint.</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">
<a name="gimp-gradient-segment-get-left-pos"></a><h3>gimp_gradient_segment_get_left_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_left_pos (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);</pre>
<p>
Retrieves the left endpoint position of the specified segment
</p>
<p>
This procedure retrieves the left endpoint position of the specified
segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-set-left-pos"></a><h3>gimp_gradient_segment_set_left_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_set_left_pos (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);</pre>
<p>
Sets the left endpoint position of the specified segment
</p>
<p>
This procedure sets the left endpoint position of the specified
segment of the specified gradient. The final position will be
between the position of the middle point to the left to the middle
point of the current segement. This procedure returns the final
position.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The position to set the guidepoint to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>final_pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-get-middle-pos"></a><h3>gimp_gradient_segment_get_middle_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_middle_pos
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);</pre>
<p>
Retrieves the middle point position of the specified segment
</p>
<p>
This procedure retrieves the middle point position of the specified
segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-set-middle-pos"></a><h3>gimp_gradient_segment_set_middle_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_set_middle_pos
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);</pre>
<p>
Sets the middle point position of the specified segment
</p>
<p>
This procedure sets the middle point position of the specified
segment of the specified gradient. The final position will be
between the two endpoints of the segment. This procedure returns the
final position.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The position to set the guidepoint to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>final_pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-get-right-pos"></a><h3>gimp_gradient_segment_get_right_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_right_pos (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *pos</code></em>);</pre>
<p>
Retrieves the right endpoint position of the specified segment
</p>
<p>
This procedure retrieves the right endpoint position of the
specified segment of the specified gradient.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-set-right-pos"></a><h3>gimp_gradient_segment_set_right_pos ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_set_right_pos (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> pos</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> *final_pos</code></em>);</pre>
<p>
Sets the right endpoint position of the specified segment
</p>
<p>
This procedure sets the right endpoint position of the specified
segment of the specified gradient. The final position will be
between the position of the middle point of the current segment and
the middle point of the segment to the right. This procedure returns
the final position.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>The position to set the guidepoint to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>final_pos</code></em> :</span></p></td>
<td>The return position.</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">
<a name="gimp-gradient-segment-get-blending-function"></a><h3>gimp_gradient_segment_get_blending_function ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_blending_function
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentType" title="enum GimpGradientSegmentType"><span class="type">GimpGradientSegmentType</span></a> *blend_func</code></em>);</pre>
<p>
Retrieves the gradient segment's blending function
</p>
<p>
This procedure retrieves the blending function of the segment at the
specified gradient name and segment index.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blend_func</code></em> :</span></p></td>
<td>The blending function of the segment.</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">
<a name="gimp-gradient-segment-get-coloring-type"></a><h3>gimp_gradient_segment_get_coloring_type ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_get_coloring_type
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentColor" title="enum GimpGradientSegmentColor"><span class="type">GimpGradientSegmentColor</span></a> *coloring_type</code></em>);</pre>
<p>
Retrieves the gradient segment's coloring type
</p>
<p>
This procedure retrieves the coloring type of the segment at the
specified gradient name and segment index.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>segment</code></em> :</span></p></td>
<td>The index of the segment within the gradient.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coloring_type</code></em> :</span></p></td>
<td>The coloring type of the segment.</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">
<a name="gimp-gradient-segment-range-set-blending-function"></a><h3>gimp_gradient_segment_range_set_blending_function ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_set_blending_function
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentType" title="enum GimpGradientSegmentType"><span class="type">GimpGradientSegmentType</span></a> blending_function</code></em>);</pre>
<p>
Change the blending function of a segments range
</p>
<p>
This function changes the blending function of a segment range to
the specified blending function.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blending_function</code></em> :</span></p></td>
<td>The blending function.</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">
<a name="gimp-gradient-segment-range-set-coloring-type"></a><h3>gimp_gradient_segment_range_set_coloring_type ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_set_coloring_type
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><a class="link" href="libgimp-gimpenums.html#GimpGradientSegmentColor" title="enum GimpGradientSegmentColor"><span class="type">GimpGradientSegmentColor</span></a> coloring_type</code></em>);</pre>
<p>
Change the coloring type of a segments range
</p>
<p>
This function changes the coloring type of a segment range to the
specified coloring type.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coloring_type</code></em> :</span></p></td>
<td>The coloring type.</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">
<a name="gimp-gradient-segment-range-flip"></a><h3>gimp_gradient_segment_range_flip ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_flip (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Flip the segment range
</p>
<p>
This function flips a segment range.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-replicate"></a><h3>gimp_gradient_segment_range_replicate ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_replicate
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> replicate_times</code></em>);</pre>
<p>
Replicate the segment range
</p>
<p>
This function replicates a segment range a given number of times.
Instead of the original segment range, several smaller scaled copies
of it will appear in equal widths.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>replicate_times</code></em> :</span></p></td>
<td>The number of times to replicate.</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">
<a name="gimp-gradient-segment-range-split-midpoint"></a><h3>gimp_gradient_segment_range_split_midpoint ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_split_midpoint
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Splits each segment in the segment range at midpoint
</p>
<p>
This function splits each segment in the segment range at its
midpoint.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-split-uniform"></a><h3>gimp_gradient_segment_range_split_uniform ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_split_uniform
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> split_parts</code></em>);</pre>
<p>
Splits each segment in the segment range uniformly
</p>
<p>
This function splits each segment in the segment range uniformly
according to the number of times specified by the parameter.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>split_parts</code></em> :</span></p></td>
<td>The number of uniform divisions to split each segment to.</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">
<a name="gimp-gradient-segment-range-delete"></a><h3>gimp_gradient_segment_range_delete ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_delete (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Delete the segment range
</p>
<p>
This function deletes a segment range.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-redistribute-handles"></a><h3>gimp_gradient_segment_range_redistribute_handles ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_redistribute_handles
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Uniformly redistribute the segment range's handles
</p>
<p>
This function redistributes the handles of the specified segment
range of the specified gradient, so they'll be evenly spaced.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-blend-colors"></a><h3>gimp_gradient_segment_range_blend_colors ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_blend_colors
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Blend the colors of the segment range.
</p>
<p>
This function blends the colors (but not the opacity) of the
segments' range of the gradient. Using it, the colors' transition
will be uniform across the range.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-blend-opacity"></a><h3>gimp_gradient_segment_range_blend_opacity ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> gimp_gradient_segment_range_blend_opacity
(<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>);</pre>
<p>
Blend the opacity of the segment range.
</p>
<p>
This function blends the opacity (but not the colors) of the
segments' range of the gradient. Using it, the opacity's transition
will be uniform across the range.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</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">
<a name="gimp-gradient-segment-range-move"></a><h3>gimp_gradient_segment_range_move ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span> gimp_gradient_segment_range_move (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code><span class="type">gint</span> start_segment</code></em>,
<em class="parameter"><code><span class="type">gint</span> end_segment</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> delta</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> control_compress</code></em>);</pre>
<p>
Move the position of an entire segment range by a delta.
</p>
<p>
This funtions moves the position of an entire segment range by a
delta. The actual delta (which is returned) will be limited by the
control points of the neighboring segments.
</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 gradient name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_segment</code></em> :</span></p></td>
<td>The index of the first segment to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_segment</code></em> :</span></p></td>
<td>The index of the last segment to operate on. If negative, the selection will extend to the end of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delta</code></em> :</span></p></td>
<td>The delta to move the segment range.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>control_compress</code></em> :</span></p></td>
<td>Whether or not to compress the neighboring segments.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The final delta by which the range moved.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>