New upstream version 2.10.0~RC1

This commit is contained in:
Jeremy Bicha
2018-03-28 12:37:30 -04:00
8195 changed files with 1939281 additions and 1033470 deletions

View File

@ -5,10 +5,10 @@
<title>gimpunit: GIMP Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIMP Base Library Reference Manual">
<link rel="up" href="libgimpbase.html" title="Part I. GIMP Base Library">
<link rel="up" href="pt01.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase-gimpsignal.html" title="gimpsignal">
<link rel="next" href="libgimpbase-gimputils.html" title="gimputils">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@ -18,7 +18,7 @@
<a href="#libgimpbase-gimpunit.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgimpbase.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimpbase-gimpsignal.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpbase-gimputils.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
@ -42,7 +42,7 @@
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-units" title="gimp_unit_get_number_of_units ()">gimp_unit_get_number_of_units</a> <span class="c_punctuation">()</span>
@ -50,7 +50,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-built-in-units" title="gimp_unit_get_number_of_built_in_units ()">gimp_unit_get_number_of_built_in_units</a> <span class="c_punctuation">()</span>
@ -66,7 +66,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-deletion-flag" title="gimp_unit_get_deletion_flag ()">gimp_unit_get_deletion_flag</a> <span class="c_punctuation">()</span>
@ -82,7 +82,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-factor" title="gimp_unit_get_factor ()">gimp_unit_get_factor</a> <span class="c_punctuation">()</span>
@ -90,42 +90,50 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-digits" title="gimp_unit_get_digits ()">gimp_unit_get_digits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-scaled-digits" title="gimp_unit_get_scaled_digits ()">gimp_unit_get_scaled_digits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-identifier" title="gimp_unit_get_identifier ()">gimp_unit_get_identifier</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-symbol" title="gimp_unit_get_symbol ()">gimp_unit_get_symbol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-abbreviation" title="gimp_unit_get_abbreviation ()">gimp_unit_get_abbreviation</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-singular" title="gimp_unit_get_singular ()">gimp_unit_get_singular</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-plural" title="gimp_unit_get_plural ()">gimp_unit_get_plural</a> <span class="c_punctuation">()</span>
@ -133,7 +141,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-format-string" title="gimp_unit_format_string ()">gimp_unit_format_string</a> <span class="c_punctuation">()</span>
@ -141,7 +149,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-pixels-to-units" title="gimp_pixels_to_units ()">gimp_pixels_to_units</a> <span class="c_punctuation">()</span>
@ -149,7 +157,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-pixels" title="gimp_units_to_pixels ()">gimp_units_to_pixels</a> <span class="c_punctuation">()</span>
@ -157,13 +165,21 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-points" title="gimp_units_to_points ()">gimp_units_to_points</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-is-metric" title="gimp_unit_is_metric ()">gimp_unit_is_metric</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#GIMP-IS-PARAM-SPEC-UNIT:CAPS" title="GIMP_IS_PARAM_SPEC_UNIT()">GIMP_IS_PARAM_SPEC_UNIT</a><span class="c_punctuation">()</span>
@ -171,7 +187,7 @@
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
<a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-param-spec-unit" title="gimp_param_spec_unit ()">gimp_param_spec_unit</a> <span class="c_punctuation">()</span>
@ -218,7 +234,7 @@ creating user-defined units.</p>
<a name="libgimpbase-gimpunit.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-unit-get-number-of-units"></a><h3>gimp_unit_get_number_of_units ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_number_of_units (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of units which are known to the <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> system.</p>
<div class="refsect3">
@ -229,7 +245,7 @@ gimp_unit_get_number_of_units (<em class="parameter"><code><span class="type">vo
<hr>
<div class="refsect2">
<a name="gimp-unit-get-number-of-built-in-units"></a><h3>gimp_unit_get_number_of_built_in_units ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_number_of_built_in_units
(<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s which are hardcoded in the unit system
@ -244,16 +260,16 @@ gimp_unit_get_number_of_built_in_units
<div class="refsect2">
<a name="gimp-unit-new"></a><h3>gimp_unit_new ()</h3>
<pre class="programlisting"><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="returnvalue">GimpUnit</span></a>
gimp_unit_new (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *identifier</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="type">gint</span></a> digits</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *symbol</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *abbreviation</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *singular</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *plural</code></em>);</pre>
gimp_unit_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *identifier</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> digits</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *symbol</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *abbreviation</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *singular</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *plural</code></em>);</pre>
<p>Returns the integer ID of the new <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>.</p>
<p>Note that a new unit is always created with it's deletion flag
set to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. You will have to set it to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> with
<p>Note that a new unit is always created with its deletion flag
set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. You will have to set it to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> with
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-set-deletion-flag" title="gimp_unit_set_deletion_flag ()"><code class="function">gimp_unit_set_deletion_flag()</code></a> to make the unit definition persistent.</p>
<div class="refsect3">
<a name="gimp-unit-new.parameters"></a><h4>Parameters</h4>
@ -310,7 +326,7 @@ set to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"
<hr>
<div class="refsect2">
<a name="gimp-unit-get-deletion-flag"></a><h3>gimp_unit_get_deletion_flag ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gimp_unit_get_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<div class="refsect3">
<a name="gimp-unit-get-deletion-flag.parameters"></a><h4>Parameters</h4>
@ -339,11 +355,11 @@ of.</p></td>
<a name="gimp-unit-set-deletion-flag"></a><h3>gimp_unit_set_deletion_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_unit_set_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> deletion_flag</code></em>);</pre>
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> deletion_flag</code></em>);</pre>
<p>Sets a <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>deletion_flag</code></em>
. If the <em class="parameter"><code>deletion_flag</code></em>
of a unit is
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when GIMP exits, this unit will not be saved in the users's
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when GIMP exits, this unit will not be saved in the users's
"unitrc" file.</p>
<p>Trying to change the <em class="parameter"><code>deletion_flag</code></em>
of a built-in unit will be silently
@ -375,7 +391,7 @@ for.</p></td>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-factor"></a><h3>gimp_unit_get_factor ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_unit_get_factor (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>A <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>factor</code></em>
is defined to be:</p>
@ -406,10 +422,16 @@ gimp_unit_get_factor (<em class="parameter"><code><a class="link" href="libgimpb
<hr>
<div class="refsect2">
<a name="gimp-unit-get-digits"></a><h3>gimp_unit_get_digits ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_digits (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>Returns the number of digits an entry field should provide to get
approximately the same accuracy as an inch input field with two digits.</p>
<p>Returns the number of digits set for <em class="parameter"><code>unit</code></em>
.
Built-in units' accuracy is approximately the same as an inch with
two digits. User-defined units can suggest a different accuracy.</p>
<p>Note: the value is as-set by defaults or by the user and does not
necessary provide enough precision on high-resolution images.
When the information is needed for a specific image, the use of
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-scaled-digits" title="gimp_unit_get_scaled_digits ()"><code class="function">gimp_unit_get_scaled_digits()</code></a> may be more appropriate.</p>
<p>Returns 0 for <em class="parameter"><code>unit</code></em>
== GIMP_UNIT_PIXEL.</p>
<div class="refsect3">
@ -434,10 +456,52 @@ approximately the same accuracy as an inch input field with two digits.</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-scaled-digits"></a><h3>gimp_unit_get_scaled_digits ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_scaled_digits (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Returns the number of digits a <em class="parameter"><code>unit</code></em>
field should provide to get
enough accuracy so that every pixel position shows a different
value from neighboring pixels.</p>
<p>Note: when needing digit accuracy to display a diagonal distance,
the <em class="parameter"><code>resolution</code></em>
may not correspond to the image's horizontal or
vertical resolution, but instead to the result of:
<code class="literal">distance_in_pixel / distance_in_inch</code>.</p>
<div class="refsect3">
<a name="gimp-unit-get-scaled-digits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the digits.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>the resolution in PPI.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-scaled-digits.returns"></a><h4>Returns</h4>
<p> The suggested number of digits.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-identifier"></a><h3>gimp_unit_get_identifier ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_identifier (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is an unstranslated string and must not be changed or freed.</p>
<p>This is an untranslated string and must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-identifier.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -461,7 +525,7 @@ gimp_unit_get_identifier (<em class="parameter"><code><a class="link" href="libg
<hr>
<div class="refsect2">
<a name="gimp-unit-get-symbol"></a><h3>gimp_unit_get_symbol ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_symbol (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is e.g. "''" for UNIT_INCH.</p>
<p>NOTE: This string must not be changed or freed.</p>
@ -488,7 +552,7 @@ gimp_unit_get_symbol (<em class="parameter"><code><a class="link" href="libgimpb
<hr>
<div class="refsect2">
<a name="gimp-unit-get-abbreviation"></a><h3>gimp_unit_get_abbreviation ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_abbreviation (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated abbreviation
of the unit.</p>
@ -516,7 +580,7 @@ of the unit.</p>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-singular"></a><h3>gimp_unit_get_singular ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_singular (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated singular form
of the unit's name.</p>
@ -544,7 +608,7 @@ of the unit's name.</p>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-plural"></a><h3>gimp_unit_get_plural ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_plural (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated plural form
of the unit's name.</p>
@ -572,8 +636,8 @@ of the unit's name.</p>
<hr>
<div class="refsect2">
<a name="gimp-unit-format-string"></a><h3>gimp_unit_format_string ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_format_string (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_format_string (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>The <em class="parameter"><code>format</code></em>
string supports the following percent expansions:</p>
@ -638,15 +702,15 @@ string.</p></td>
replaced with the resp. strings for <em class="parameter"><code>unit</code></em>
.</p>
</div>
<p class="since">Since: GIMP 2.8</p>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-pixels-to-units"></a><h3>gimp_pixels_to_units ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_pixels_to_units (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> pixels</code></em>,
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_pixels_to_units (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> pixels</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in pixels to <em class="parameter"><code>unit</code></em>
.</p>
@ -671,7 +735,7 @@ gimp_pixels_to_units (<em class="parameter"><code><a href="/usr/share/gtk-doc/ht
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>resloution in DPI</p></td>
<td class="parameter_description"><p>resolution in DPI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -682,15 +746,15 @@ gimp_pixels_to_units (<em class="parameter"><code><a href="/usr/share/gtk-doc/ht
<p> <em class="parameter"><code>pixels</code></em>
converted to units.</p>
</div>
<p class="since">Since: GIMP 2.8</p>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-pixels"></a><h3>gimp_units_to_pixels ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_pixels (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_pixels (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to pixels.</p>
@ -727,15 +791,15 @@ gimp_units_to_pixels (<em class="parameter"><code><a href="/usr/share/gtk-doc/ht
<p> <em class="parameter"><code>value</code></em>
converted to pixels.</p>
</div>
<p class="since">Since: GIMP 2.8</p>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-points"></a><h3>gimp_units_to_points ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_points (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_points (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to points.</p>
@ -772,7 +836,39 @@ gimp_units_to_points (<em class="parameter"><code><a href="/usr/share/gtk-doc/ht
<p> <em class="parameter"><code>value</code></em>
converted to points.</p>
</div>
<p class="since">Since: GIMP 2.8</p>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-is-metric"></a><h3>gimp_unit_is_metric ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gimp_unit_is_metric (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>Checks if the given <em class="parameter"><code>unit</code></em>
is metric. A simplistic test is used
that looks at the unit's factor and checks if it is 2.54 multiplied
by some common powers of 10. Currently it checks for mm, cm, dm, m.</p>
<p>See also: <a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-factor" title="gimp_unit_get_factor ()"><code class="function">gimp_unit_get_factor()</code></a></p>
<div class="refsect3">
<a name="gimp-unit-is-metric.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-is-metric.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>unit</code></em>
is metric.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
@ -783,16 +879,16 @@ converted to points.</p>
<hr>
<div class="refsect2">
<a name="gimp-param-spec-unit"></a><h3>gimp_param_spec_unit ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
gimp_param_spec_unit (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *nick</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *blurb</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_pixels</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_percent</code></em>,
<pre class="programlisting"><a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
gimp_param_spec_unit (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *nick</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *blurb</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_pixels</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_percent</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> default_value</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a> flags</code></em>);</pre>
<em class="parameter"><code><a href="../gobject/gobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a> flags</code></em>);</pre>
<p>Creates a param spec to hold a units param.
See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec-internal"><code class="function">g_param_spec_internal()</code></a> for more information.</p>
See <a href="../gobject/gobject-GParamSpec.html#g-param-spec-internal"><code class="function">g_param_spec_internal()</code></a> for more information.</p>
<div class="refsect3">
<a name="gimp-param-spec-unit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -814,7 +910,7 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
</tr>
<tr>
<td class="parameter_name"><p>blurb</p></td>
<td class="parameter_description"><p>Brief desciption of param.</p></td>
<td class="parameter_description"><p>Brief description of param.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -824,7 +920,7 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
</tr>
<tr>
<td class="parameter_name"><p>allow_percent</p></td>
<td class="parameter_description"><p>Whether "perecent" is an allowed unit.</p></td>
<td class="parameter_description"><p>Whether "percent" is an allowed unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -834,7 +930,7 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>a combination of <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a></p></td>
<td class="parameter_description"><p>a combination of <a href="../gobject/gobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -842,9 +938,9 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
</div>
<div class="refsect3">
<a name="gimp-param-spec-unit.returns"></a><h4>Returns</h4>
<p> a newly allocated <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> instance</p>
<p> a newly allocated <a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> instance</p>
</div>
<p class="since">Since: GIMP 2.4</p>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
@ -910,7 +1006,7 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
<a name="GIMP-TYPE-UNIT:CAPS"></a><h3>GIMP_TYPE_UNIT</h3>
<pre class="programlisting">#define GIMP_TYPE_UNIT (gimp_unit_get_type ())
</pre>
<p><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT"><span class="type">GIMP_TYPE_UNIT</span></a> is a <a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> derived from <a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>.</p>
<p><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT"><span class="type">GIMP_TYPE_UNIT</span></a> is a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> derived from <a href="../gobject/gobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>.</p>
</div>
<hr>
<div class="refsect2">
@ -921,10 +1017,10 @@ See <a href="/usr/share/gtk-doc/html/gobjectgobject-GParamSpec.html#g-param-spec
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.see-also"></a><h2>See Also</h2>
<p><span class="type">GimpUnitMenu</span>, <span class="type">GimpSizeEntry</span>.</p>
<p><a href="../libgimpwidgets/GimpUnitMenu.html#GimpUnitMenu-struct"><span class="type">GimpUnitMenu</span></a>, <a href="../libgimpwidgets/GimpSizeEntry.html#GimpSizeEntry-struct"><span class="type">GimpSizeEntry</span></a>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>