Files
gimp/devel-docs/libgimp/html/GimpZoomPreview.html
2010-08-11 01:21:06 -04:00

374 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GimpZoomPreview</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
<link rel="up" href="libgimpui.html" title="Part&#160;II.&#160;GIMP User Interface Library">
<link rel="prev" href="GimpAspectPreview.html" title="GimpAspectPreview">
<link rel="next" href="libgimp-GimpItemComboBox.html" title="GimpItemComboBox">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="libgimp.html" title="Part&#160;I.&#160;GIMP Library">
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
<link rel="part" href="libgimpui.html" title="Part&#160;II.&#160;GIMP User Interface Library">
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="libgimp-index.html" title="Index">
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GimpAspectPreview.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgimpui.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-GimpItemComboBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2573936" class="shortcut">Top</a>
&#160;|&#160;
<a href="#id2701955" class="shortcut">Description</a>
&#160;|&#160;
<a href="#id2701586" class="shortcut">Object Hierarchy</a>
&#160;|&#160;
<a href="#id2701891" class="shortcut">Implemented Interfaces</a>
&#160;|&#160;
<a href="#id2701912" class="shortcut">Properties</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GimpZoomPreview"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2573936"></a><span class="refentrytitle">GimpZoomPreview</span>
</h2>
<p>GimpZoomPreview</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
<a href="GimpZoomPreview.html#GimpZoomPreview-struct">GimpZoomPreview</a>;
GtkWidget* <a href="GimpZoomPreview.html#gimp-zoom-preview-new">gimp_zoom_preview_new</a> (<a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a> *drawable);
GtkWidget* <a href="GimpZoomPreview.html#gimp-zoom-preview-new-with-model">gimp_zoom_preview_new_with_model</a>
(<a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a> *drawable,
GimpZoomModel *model);
guchar* <a href="GimpZoomPreview.html#gimp-zoom-preview-get-source">gimp_zoom_preview_get_source</a> (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview,
gint *width,
gint *height,
gint *bpp);
<a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a>* <a href="GimpZoomPreview.html#gimp-zoom-preview-get-drawable">gimp_zoom_preview_get_drawable</a>
(<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);
gdouble <a href="GimpZoomPreview.html#gimp-zoom-preview-get-factor">gimp_zoom_preview_get_factor</a> (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);
GimpZoomModel* <a href="GimpZoomPreview.html#gimp-zoom-preview-get-model">gimp_zoom_preview_get_model</a> (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2701586"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBox
+----GtkVBox
+----<a
href="../libgimpwidgets/GimpPreview.html"
>GimpPreview</a>
+----<a
href="../libgimpwidgets/GimpScrolledPreview.html"
>GimpScrolledPreview</a>
+----GimpZoomPreview
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2701891"></a><h2>Implemented Interfaces</h2>
<p>
GimpZoomPreview implements
AtkImplementorIface.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2701912"></a><h2>Properties</h2>
<pre class="synopsis">
"<a href="GimpZoomPreview.html#GimpZoomPreview--drawable">drawable</a>" gpointer : Read / Write / Construct Only
"<a href="GimpZoomPreview.html#GimpZoomPreview--model">model</a>" GimpZoomModel : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2701955"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2701971"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2701982"></a><h3>
<a name="GimpZoomPreview-struct"></a>GimpZoomPreview</h3>
<a class="indexterm" name="id2701993"></a><pre class="programlisting">typedef struct _GimpZoomPreview GimpZoomPreview;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2702010"></a><h3>
<a name="gimp-zoom-preview-new"></a>gimp_zoom_preview_new ()</h3>
<a class="indexterm" name="id2702023"></a><pre class="programlisting">GtkWidget* gimp_zoom_preview_new (<a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a> *drawable);</pre>
<p>
Creates a new <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget for <em class="parameter"><code>drawable</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="libgimp-gimpdrawable.html#GimpDrawable"><span class="type">GimpDrawable</span></a>
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2705652"></a><h3>
<a name="gimp-zoom-preview-new-with-model"></a>gimp_zoom_preview_new_with_model ()</h3>
<a class="indexterm" name="id2705666"></a><pre class="programlisting">GtkWidget* gimp_zoom_preview_new_with_model
(<a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a> *drawable,
GimpZoomModel *model);</pre>
<p>
Creates a new <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget for <em class="parameter"><code>drawable</code></em> using the
given <em class="parameter"><code>model</code></em>.
</p>
<p>
This variant of <a href="GimpZoomPreview.html#gimp-zoom-preview-new"><code class="function">gimp_zoom_preview_new()</code></a> allows you to create a
preview using an existing zoom model. This may be useful if for
example you want to have two zoom previews that keep their zoom
factor in sync.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="libgimp-gimpdrawable.html#GimpDrawable"><span class="type">GimpDrawable</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>model</code></em>&#160;:</span></td>
<td> a <span class="type">GimpZoomModel</span>
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2705803"></a><h3>
<a name="gimp-zoom-preview-get-source"></a>gimp_zoom_preview_get_source ()</h3>
<a class="indexterm" name="id2705816"></a><pre class="programlisting">guchar* gimp_zoom_preview_get_source (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview,
gint *width,
gint *height,
gint *bpp);</pre>
<p>
Returns the scaled image data of the part of the drawable the
<a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> is currently showing, as a newly allocated array of guchar.
This function also allow to get the current width, height and bpp of the
<a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>preview</code></em>&#160;:</span></td>
<td> a <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> a pointer to an int where the current width of the zoom widget
will be put.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> a pointer to an int where the current width of the zoom widget
will be put.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>bpp</code></em>&#160;:</span></td>
<td> return location for the number of bytes per pixel
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> newly allocated data that should be released using <code class="function">g_free()</code>
when it is not any longer needed
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2703312"></a><h3>
<a name="gimp-zoom-preview-get-drawable"></a>gimp_zoom_preview_get_drawable ()</h3>
<a class="indexterm" name="id2703326"></a><pre class="programlisting"><a href="libgimp-gimpdrawable.html#GimpDrawable">GimpDrawable</a>* gimp_zoom_preview_get_drawable
(<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);</pre>
<p>
Returns the <a href="libgimp-gimpdrawable.html#GimpDrawable"><span class="type">GimpDrawable</span></a> the <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> is attached to.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>preview</code></em>&#160;:</span></td>
<td> a <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the <a href="libgimp-gimpdrawable.html#GimpDrawable"><span class="type">GimpDrawable</span></a> that was passed to <a href="GimpZoomPreview.html#gimp-zoom-preview-new"><code class="function">gimp_zoom_preview_new()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2703430"></a><h3>
<a name="gimp-zoom-preview-get-factor"></a>gimp_zoom_preview_get_factor ()</h3>
<a class="indexterm" name="id2703443"></a><pre class="programlisting">gdouble gimp_zoom_preview_get_factor (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);</pre>
<p>
Returns the zoom factor the preview is currently using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>preview</code></em>&#160;:</span></td>
<td> a <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the current zoom factor
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2707317"></a><h3>
<a name="gimp-zoom-preview-get-model"></a>gimp_zoom_preview_get_model ()</h3>
<a class="indexterm" name="id2707329"></a><pre class="programlisting">GimpZoomModel* gimp_zoom_preview_get_model (<a href="GimpZoomPreview.html" title="GimpZoomPreview">GimpZoomPreview</a> *preview);</pre>
<p>
Returns the <span class="type">GimpZoomModel</span> the preview is using.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>preview</code></em>&#160;:</span></td>
<td> a <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> widget
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a pointer to the <span class="type">GimpZoomModel</span> owned by the <em class="parameter"><code>preview</code></em>
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2707411"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2707420"></a><h3>
<a name="GimpZoomPreview--drawable"></a>The "<code class="literal">drawable</code>" property</h3>
<a class="indexterm" name="id2707433"></a><pre class="programlisting"> "drawable" gpointer : Read / Write / Construct Only</pre>
<p>
The drawable the <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a> is attached to.</p>
<p>
</p>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2707467"></a><h3>
<a name="GimpZoomPreview--model"></a>The "<code class="literal">model</code>" property</h3>
<a class="indexterm" name="id2707480"></a><pre class="programlisting"> "model" GimpZoomModel : Read / Write / Construct Only</pre>
<p>
The <span class="type">GimpZoomModel</span> used by this <a href="GimpZoomPreview.html" title="GimpZoomPreview"><span class="type">GimpZoomPreview</span></a>.</p>
<p>
</p>
<p>Since GIMP 2.4
</p>
</div>
</div>
</div>
</body>
</html>