Files
gimp/devel-docs/libgimpwidgets/html/GimpPreviewArea.html
2012-05-05 12:33:49 +02:00

568 lines
36 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>GimpPreviewArea</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIMP Widgets Library Reference Manual">
<link rel="up" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
<link rel="prev" href="GimpPickButton.html" title="GimpPickButton">
<link rel="next" href="GimpPreview.html" title="GimpPreview">
<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="GimpPickButton.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgimpwidgets-widgets.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 Widgets Library Reference Manual</th>
<td><a accesskey="n" href="GimpPreview.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GimpPreviewArea.synopsis" class="shortcut">Top</a>
 | 
<a href="#GimpPreviewArea.description" class="shortcut">Description</a>
 | 
<a href="#GimpPreviewArea.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
<a href="#GimpPreviewArea.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
 | 
<a href="#GimpPreviewArea.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GimpPreviewArea"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GimpPreviewArea.top_of_page"></a>GimpPreviewArea</span></h2>
<p>GimpPreviewArea — A general purpose preview widget which caches
its pixel data.</p>
</td>
<td valign="top" align="right"><img src="gimp-preview-area.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GimpPreviewArea.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"> <a class="link" href="GimpPreviewArea.html#GimpPreviewArea-struct" title="GimpPreviewArea">GimpPreviewArea</a>;
<span class="returnvalue">GtkWidget</span> * <a class="link" href="GimpPreviewArea.html#gimp-preview-area-new" title="gimp_preview_area_new ()">gimp_preview_area_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-draw" title="gimp_preview_area_draw ()">gimp_preview_area_draw</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-fill" title="gimp_preview_area_fill ()">gimp_preview_area_fill</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><span class="type">guchar</span> red</code></em>,
<em class="parameter"><code><span class="type">guchar</span> green</code></em>,
<em class="parameter"><code><span class="type">guchar</span> blue</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-blend" title="gimp_preview_area_blend ()">gimp_preview_area_blend</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf1</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride1</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf2</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride2</code></em>,
<em class="parameter"><code><span class="type">guchar</span> opacity</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-mask" title="gimp_preview_area_mask ()">gimp_preview_area_mask</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf1</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride1</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf2</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride2</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *mask</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride_mask</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-set-offsets" title="gimp_preview_area_set_offsets ()">gimp_preview_area_set_offsets</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-set-colormap" title="gimp_preview_area_set_colormap ()">gimp_preview_area_set_colormap</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *colormap</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_colors</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-set-max-size" title="gimp_preview_area_set_max_size ()">gimp_preview_area_set_max_size</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GimpPreviewArea.html#gimp-preview-area-menu-popup" title="gimp_preview_area_menu_popup ()">gimp_preview_area_menu_popup</a> (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">GdkEventButton</span> *event</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkDrawingArea
+----GimpPreviewArea
</pre>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GimpPreviewArea implements
AtkImplementorIface and GtkBuildable.</p>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="GimpPreviewArea.html#GimpPreviewArea--check-size" title='The "check-size" property'>check-size</a>" <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpCheckSize"><span class="type">GimpCheckSize</span></a> : Read / Write
"<a class="link" href="GimpPreviewArea.html#GimpPreviewArea--check-type" title='The "check-type" property'>check-type</a>" <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpCheckType"><span class="type">GimpCheckType</span></a> : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.description"></a><h2>Description</h2>
<p>
A general purpose preview widget which caches its pixel data.
</p>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GimpPreviewArea-struct"></a><h3>GimpPreviewArea</h3>
<pre class="programlisting">typedef struct _GimpPreviewArea GimpPreviewArea;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-new"></a><h3>gimp_preview_area_new ()</h3>
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> * gimp_preview_area_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.
Since GIMP 2.2</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-draw"></a><h3>gimp_preview_area_draw ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_draw (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride</code></em>);</pre>
<p>
Draws <em class="parameter"><code>buf</code></em> on <em class="parameter"><code>area</code></em> and queues a redraw on the given rectangle.
</p>
<p>
Since GIMP 2.2
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>x offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>y offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>buffer width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>buffer height</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> of <em class="parameter"><code>buf</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the preview pixel data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
<td>rowstride of <em class="parameter"><code>buf</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-fill"></a><h3>gimp_preview_area_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_fill (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><span class="type">guchar</span> red</code></em>,
<em class="parameter"><code><span class="type">guchar</span> green</code></em>,
<em class="parameter"><code><span class="type">guchar</span> blue</code></em>);</pre>
<p>
Fills the given rectangle of <em class="parameter"><code>area</code></em> in the given color and queues a
redraw.
</p>
<p>
Since GIMP 2.2
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>x offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>y offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>width of the rectangle to fill</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>height of the rectangle to fill</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
<td>red component of the fill color (0-255)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
<td>green component of the fill color (0-255)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
<td>red component of the fill color (0-255)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-blend"></a><h3>gimp_preview_area_blend ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_blend (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf1</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride1</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf2</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride2</code></em>,
<em class="parameter"><code><span class="type">guchar</span> opacity</code></em>);</pre>
<p>
Composites <em class="parameter"><code>buf1</code></em> on <em class="parameter"><code>buf2</code></em> with the given <em class="parameter"><code>opacity</code></em>, draws the result
to <em class="parameter"><code>area</code></em> and queues a redraw on the given rectangle.
</p>
<p>
Since GIMP 2.2
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>x offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>y offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>buffer width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>buffer height</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> of <em class="parameter"><code>buf1</code></em> and <em class="parameter"><code>buf2</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the pixel data for
the lower layer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride1</code></em> :</span></p></td>
<td>rowstride of <em class="parameter"><code>buf1</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the pixel data for
the upper layer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride2</code></em> :</span></p></td>
<td>rowstride of <em class="parameter"><code>buf2</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opacity</code></em> :</span></p></td>
<td>The opacity of the first layer.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-mask"></a><h3>gimp_preview_area_mask ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_mask (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf1</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride1</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *buf2</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride2</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *mask</code></em>,
<em class="parameter"><code><span class="type">gint</span> rowstride_mask</code></em>);</pre>
<p>
Composites <em class="parameter"><code>buf1</code></em> on <em class="parameter"><code>buf2</code></em> with the given <em class="parameter"><code>mask</code></em>, draws the result on
<em class="parameter"><code>area</code></em> and queues a redraw on the given rectangle.
</p>
<p>
Since GIMP 2.2
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>x offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>y offset in preview</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>buffer width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>buffer height</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"><span class="type">GimpImageType</span></a> of <em class="parameter"><code>buf1</code></em> and <em class="parameter"><code>buf2</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the pixel data for
the lower layer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride1</code></em> :</span></p></td>
<td>rowstride of <em class="parameter"><code>buf1</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the pixel data for
the upper layer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride2</code></em> :</span></p></td>
<td>rowstride of <em class="parameter"><code>buf2</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer representing the mask of the second
layer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rowstride_mask</code></em> :</span></p></td>
<td>rowstride for the mask.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-set-offsets"></a><h3>gimp_preview_area_set_offsets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_set_offsets (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> x</code></em>,
<em class="parameter"><code><span class="type">gint</span> y</code></em>);</pre>
<p>
Sets the offsets of the previewed area. This information is used
when drawing the checkerboard and to determine the dither offsets.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>horizontal offset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>vertical offset</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-set-colormap"></a><h3>gimp_preview_area_set_colormap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_set_colormap (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code>const <span class="type">guchar</span> *colormap</code></em>,
<em class="parameter"><code><span class="type">gint</span> num_colors</code></em>);</pre>
<p>
Sets the colormap for the <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget. You need to
call this function before you use <a class="link" href="GimpPreviewArea.html#gimp-preview-area-draw" title="gimp_preview_area_draw ()"><code class="function">gimp_preview_area_draw()</code></a> with
an image type of <code class="literal">GIMP_INDEXED_IMAGE</code> or <code class="literal">GIMP_INDEXEDA_IMAGE</code>.
</p>
<p>
Since GIMP 2.2
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>colormap</code></em> :</span></p></td>
<td>a <span class="type">guchar</span> buffer that contains the colormap</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_colors</code></em> :</span></p></td>
<td>the number of colors in the colormap</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-set-max-size"></a><h3>gimp_preview_area_set_max_size ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_set_max_size (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>);</pre>
<p>
Usually a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> fills the size that it is
allocated. This funtion allows you to limit the preview area to a
maximum size. If a larger size is allocated for the widget, the
preview will draw itself centered into the allocated area.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> widget</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>the maximum width in pixels or -1 to unset the limit</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>the maximum height in pixels or -1 to unset the limit</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-preview-area-menu-popup"></a><h3>gimp_preview_area_menu_popup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gimp_preview_area_menu_popup (<em class="parameter"><code><a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a> *area</code></em>,
<em class="parameter"><code><span class="type">GdkEventButton</span> *event</code></em>);</pre>
<p>
Creates a popup menu that allows to configure the size and type of
the checkerboard pattern that the <em class="parameter"><code>area</code></em> uses to visualize transparency.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>area</code></em> :</span></p></td>
<td>a <a class="link" href="GimpPreviewArea.html" title="GimpPreviewArea"><span class="type">GimpPreviewArea</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the button event that causes the menu to popup or <code class="literal">NULL</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.2</p>
</div>
</div>
<div class="refsect1">
<a name="GimpPreviewArea.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GimpPreviewArea--check-size"></a><h3>The <code class="literal">"check-size"</code> property</h3>
<pre class="programlisting"> "check-size" <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpCheckSize"><span class="type">GimpCheckSize</span></a> : Read / Write</pre>
<p></p>
<p>Default value: GIMP_CHECK_SIZE_MEDIUM_CHECKS</p>
</div>
<hr>
<div class="refsect2">
<a name="GimpPreviewArea--check-type"></a><h3>The <code class="literal">"check-type"</code> property</h3>
<pre class="programlisting"> "check-type" <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpbaseenums.html#GimpCheckType"><span class="type">GimpCheckType</span></a> : Read / Write</pre>
<p></p>
<p>Default value: GIMP_CHECK_TYPE_GRAY_CHECKS</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>