/usr/include/xmorph/warp-gtk.h is in libmorph-dev 1:20140707+nmu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #ifndef __WARP_GTK_H__
#define __WARP_GTK_H__
#include "warp.h"
#ifndef GDK_PIXBUF_MAJOR
#error you need to install gtk 2.0 or gdk-pixbuf, and include <gdk-pixbuf/gdk-pixbuf.h> to use this header
#endif
//FIXME this test does not work
#if PIXEL_MIN != 0 || PIXEL_MAX != 255
#error the library libmorph was compiled with a choice of PIXEL_TYPE that is incompatible with gdk pixbuffers
#endif
static inline
void warp_image_gdk_a
( GdkPixbuf *src, GdkPixbuf *dst,
const double *xs, const double *ys, const double *xd, const double *yd,
int mesh_width, int mesh_height)
{
warp_image_versatile
(gdk_pixbuf_get_pixels(src),
gdk_pixbuf_get_width(src),gdk_pixbuf_get_height(src),
gdk_pixbuf_get_n_channels(src),gdk_pixbuf_get_rowstride(src),gdk_pixbuf_get_n_channels(src),
gdk_pixbuf_get_pixels(dst),
gdk_pixbuf_get_width(dst),gdk_pixbuf_get_height(dst),
gdk_pixbuf_get_n_channels(dst),gdk_pixbuf_get_rowstride(dst),gdk_pixbuf_get_n_channels(dst),
xs, ys, xd, yd,
mesh_width, mesh_height);
}
static inline
void warp_image_gdk_m
( GdkPixbuf *src, GdkPixbuf *dst,
MeshT *srcmesh, MeshT *dstmesh)
{
g_return_if_fail( srcmesh->nx == dstmesh->nx && srcmesh->ny == dstmesh->ny);
warp_image_versatile
(gdk_pixbuf_get_pixels(src),
gdk_pixbuf_get_width(src),gdk_pixbuf_get_height(src),
gdk_pixbuf_get_n_channels(src),gdk_pixbuf_get_rowstride(src),gdk_pixbuf_get_n_channels(src),
gdk_pixbuf_get_pixels(dst),
gdk_pixbuf_get_width(dst),gdk_pixbuf_get_height(dst),
gdk_pixbuf_get_n_channels(dst),gdk_pixbuf_get_rowstride(dst),gdk_pixbuf_get_n_channels(dst),
srcmesh->x, srcmesh->y,
dstmesh->x, dstmesh->y,
srcmesh->nx,srcmesh->ny);
}
#endif // __WARP_GTK_H__
|