1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5
<refentry id="libgimp-gimptile">
7
<refentrytitle>gimptile</refentrytitle>
8
<manvolnum>3</manvolnum>
9
<refmiscinfo>LIBGIMP Library</refmiscinfo>
13
<refname>gimptile</refname><refpurpose>Functions for working with tiles.</refpurpose>
16
<refsynopsisdiv><title>Synopsis</title>
22
<link linkend="GimpTile">GimpTile</link>;
23
<link linkend="void">void</link> <link linkend="gimp-tile-ref">gimp_tile_ref</link> (<link linkend="GimpTile">GimpTile</link> *tile);
24
<link linkend="void">void</link> <link linkend="gimp-tile-ref-zero">gimp_tile_ref_zero</link> (<link linkend="GimpTile">GimpTile</link> *tile);
25
<link linkend="void">void</link> <link linkend="gimp-tile-unref">gimp_tile_unref</link> (<link linkend="GimpTile">GimpTile</link> *tile,
26
<link linkend="gboolean">gboolean</link> dirty);
27
<link linkend="void">void</link> <link linkend="gimp-tile-flush">gimp_tile_flush</link> (<link linkend="GimpTile">GimpTile</link> *tile);
28
<link linkend="void">void</link> <link linkend="gimp-tile-cache-size">gimp_tile_cache_size</link> (<link linkend="gulong">gulong</link> kilobytes);
29
<link linkend="void">void</link> <link linkend="gimp-tile-cache-ntiles">gimp_tile_cache_ntiles</link> (<link linkend="gulong">gulong</link> ntiles);
42
<title>Description</title>
44
Functions for working with tiles.
50
<title>Details</title>
52
<title><anchor id="GimpTile"/>GimpTile</title>
53
<indexterm><primary>GimpTile</primary></indexterm><programlisting>typedef struct {
54
guint ewidth; /* the effective width of the tile */
55
guint eheight; /* the effective height of the tile */
56
guint bpp; /* the bytes per pixel (1, 2, 3 or 4 ) */
57
guint tile_num; /* the number of this tile within the drawable */
58
guint16 ref_count; /* reference count for the tile */
59
guint dirty : 1; /* is the tile dirty? has it been modified? */
60
guint shadow: 1; /* is this a shadow tile */
61
guchar *data; /* the pixel data for the tile */
62
GimpDrawable *drawable; /* the drawable this tile came from */
69
<title><anchor id="gimp-tile-ref"/>gimp_tile_ref ()</title>
70
<indexterm><primary>gimp_tile_ref</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_ref (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
73
</para><variablelist role="params">
74
<varlistentry><term><parameter>tile</parameter> :</term>
78
</simpara></listitem></varlistentry>
79
</variablelist></refsect2>
81
<title><anchor id="gimp-tile-ref-zero"/>gimp_tile_ref_zero ()</title>
82
<indexterm><primary>gimp_tile_ref_zero</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_ref_zero (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
85
</para><variablelist role="params">
86
<varlistentry><term><parameter>tile</parameter> :</term>
90
</simpara></listitem></varlistentry>
91
</variablelist></refsect2>
93
<title><anchor id="gimp-tile-unref"/>gimp_tile_unref ()</title>
94
<indexterm><primary>gimp_tile_unref</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_unref (<link linkend="GimpTile">GimpTile</link> *tile,
95
<link linkend="gboolean">gboolean</link> dirty);</programlisting>
98
</para><variablelist role="params">
99
<varlistentry><term><parameter>tile</parameter> :</term>
101
</simpara></listitem></varlistentry>
102
<varlistentry><term><parameter>dirty</parameter> :</term>
106
</simpara></listitem></varlistentry>
107
</variablelist></refsect2>
109
<title><anchor id="gimp-tile-flush"/>gimp_tile_flush ()</title>
110
<indexterm><primary>gimp_tile_flush</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_flush (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
113
</para><variablelist role="params">
114
<varlistentry><term><parameter>tile</parameter> :</term>
118
</simpara></listitem></varlistentry>
119
</variablelist></refsect2>
121
<title><anchor id="gimp-tile-cache-size"/>gimp_tile_cache_size ()</title>
122
<indexterm><primary>gimp_tile_cache_size</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_cache_size (<link linkend="gulong">gulong</link> kilobytes);</programlisting>
124
Sets the size of the tile cache on the plug-in side. The tile cache
125
is used to reduce the number of tiles exchanged between the GIMP core
126
and the plug-in. See also <link linkend="gimp-tile-cache-ntiles"><function>gimp_tile_cache_ntiles()</function></link>.</para>
129
</para><variablelist role="params">
130
<varlistentry><term><parameter>kilobytes</parameter> :</term>
131
<listitem><simpara> new cache size in kilobytes
132
</simpara></listitem></varlistentry>
133
</variablelist></refsect2>
135
<title><anchor id="gimp-tile-cache-ntiles"/>gimp_tile_cache_ntiles ()</title>
136
<indexterm><primary>gimp_tile_cache_ntiles</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_cache_ntiles (<link linkend="gulong">gulong</link> ntiles);</programlisting>
138
Sets the size of the tile cache on the plug-in side. This function
139
is similar to <link linkend="gimp-tile-cache-size"><function>gimp_tile_cache_size()</function></link> but allows to specify the
140
number of tiles directly.
143
If your plug-in access pixels tile-by-tile, it doesn't need a tile
144
cache at all. If however the plug-in accesses drawable pixel data
145
row-by-row, it should set the tile cache large enough to hold the
146
number of tiles per row. Double this size if your plug-in uses
150
</para><variablelist role="params">
151
<varlistentry><term><parameter>ntiles</parameter> :</term>
152
<listitem><simpara> number of tiles that should fit into the cache
153
</simpara></listitem></varlistentry>
154
</variablelist></refsect2>