<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cutter-Assertions-with-gdk-pixbuf-support">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Assertions-with-gdk-pixbuf-support.top_of_page">Assertions with gdk-pixbuf support</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  CUTTER Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Assertions with gdk-pixbuf support</refname>
<refpurpose>Checks that your program works as you
expect with gdk-pixbuf support.</refpurpose>
</refnamediv>

<refsynopsisdiv id="cutter-Assertions-with-gdk-pixbuf-support.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis><link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="gdkcut-pixbuf-assert-equal">gdkcut_pixbuf_assert_equal</link>          (<parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *expected</parameter>,
                                                         <parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *actual</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> threshold</parameter>,
                                                         <parameter>...</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="cutter-Assertions-with-gdk-pixbuf-support.description" role="desc">
<title role="desc.title">Description</title>

</refsect1>
<refsect1 id="cutter-Assertions-with-gdk-pixbuf-support.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="gdkcut-pixbuf-assert-equal" role="function" condition="since:1.0.5">
<title>gdkcut_pixbuf_assert_equal ()</title>
<indexterm zone="gdkcut-pixbuf-assert-equal" role="1.0.5"><primary>gdkcut_pixbuf_assert_equal</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                gdkcut_pixbuf_assert_equal          (<parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *expected</parameter>,
                                                         <parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *actual</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> threshold</parameter>,
                                                         <parameter>...</parameter>);</programlisting>
<para>
Passes if <parameter>expected</parameter> == <parameter>actual</parameter>. If difference of each
corresponding pixel value is within threshold, <parameter>expected</parameter>
and <parameter>actual</parameter> are treated as equal image.
</para>
<para>
If threshold is 3, pixel value of <parameter>expected</parameter> at (1, 1) is
127 and pixel value of <parameter>actual</parameter> at (1, 1) is 131, <parameter>actual</parameter>
doesn't equals to <parameter>expected</parameter>. If pixel value of <parameter>actual</parameter> at
(1, 1) is 130, <parameter>actual</parameter> may equal to <parameter>expected</parameter>. (All other
corresponding pixel values are needed to fill this
condition.)
</para><variablelist role="params">
<varlistentry><term><parameter>expected</parameter>&#160;:</term>
<listitem><simpara>an expected <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>actual</parameter>&#160;:</term>
<listitem><simpara>an actual <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>threshold</parameter>&#160;:</term>
<listitem><simpara>an threshold used for detecting pixel difference.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara>optional message. See <link linkend="cut-message"><function>cut_message()</function></link> for details.</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.0.5</para></refsect2>

</refsect1>

</refentry>
