summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-09-17 15:53:59 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-09-17 15:53:59 +0000
commitef79a175b51bf5924d63b15c11bb7987857f10bd (patch)
treefca250a2f2a77cb5fc8b061f0f002c2b0dbec498 /gdk-pixbuf
parent9c7f0f8c2abd8aac5b0697bfd40eede1e60461d7 (diff)
downloadgdk-pixbuf-ef79a175b51bf5924d63b15c11bb7987857f10bd.tar.gz
Mirror GdkInterpType to PixopsInterpType to avoid including gdk-pixbuf
Mon Sep 17 11:49:02 2001 Owen Taylor <otaylor@redhat.com> * pixops/*: Mirror GdkInterpType to PixopsInterpType to avoid including gdk-pixbuf headers.
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/pixops/Makefile.am2
-rw-r--r--gdk-pixbuf/pixops/pixops.c30
-rw-r--r--gdk-pixbuf/pixops/pixops.h15
-rw-r--r--gdk-pixbuf/pixops/timescale.c26
5 files changed, 44 insertions, 34 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index ee7120be4..97e138870 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+Mon Sep 17 11:49:02 2001 Owen Taylor <otaylor@redhat.com>
+
+ * pixops/*: Mirror GdkInterpType to PixopsInterpType
+ to avoid including gdk-pixbuf headers.
+
2001-09-16 James Henstridge <james@daa.com.au>
* .cvsignore: add generated files to ignore list.
diff --git a/gdk-pixbuf/pixops/Makefile.am b/gdk-pixbuf/pixops/Makefile.am
index 42c7d3aa1..a1df47711 100644
--- a/gdk-pixbuf/pixops/Makefile.am
+++ b/gdk-pixbuf/pixops/Makefile.am
@@ -2,8 +2,6 @@ noinst_LTLIBRARIES = libpixops.la
INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir) -I$(top_builddir) \
- -I$(top_srcdir)/gdk-pixbuf \
- -I$(top_builddir)/gdk-pixbuf \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
@STRIP_END@
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
index 9fc732e9a..c9606107f 100644
--- a/gdk-pixbuf/pixops/pixops.c
+++ b/gdk-pixbuf/pixops/pixops.c
@@ -1345,7 +1345,7 @@ pixops_composite_color (guchar *dest_buf,
gboolean src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type,
+ PixopsInterpType interp_type,
int overall_alpha,
int check_x,
int check_y,
@@ -1374,7 +1374,7 @@ pixops_composite_color (guchar *dest_buf,
switch (interp_type)
{
- case GDK_INTERP_NEAREST:
+ case PIXOPS_INTERP_NEAREST:
pixops_composite_color_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
@@ -1382,15 +1382,15 @@ pixops_composite_color (guchar *dest_buf,
check_x, check_y, check_size, color1, color2);
return;
- case GDK_INTERP_TILES:
+ case PIXOPS_INTERP_TILES:
tile_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
- case GDK_INTERP_BILINEAR:
+ case PIXOPS_INTERP_BILINEAR:
bilinear_make_fast_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
- case GDK_INTERP_HYPER:
+ case PIXOPS_INTERP_HYPER:
bilinear_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
}
@@ -1429,7 +1429,7 @@ pixops_composite (guchar *dest_buf,
gboolean src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type,
+ PixopsInterpType interp_type,
int overall_alpha)
{
PixopsFilter filter;
@@ -1453,22 +1453,22 @@ pixops_composite (guchar *dest_buf,
switch (interp_type)
{
- case GDK_INTERP_NEAREST:
+ case PIXOPS_INTERP_NEAREST:
pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels,
src_has_alpha, scale_x, scale_y, overall_alpha);
return;
- case GDK_INTERP_TILES:
+ case PIXOPS_INTERP_TILES:
tile_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
- case GDK_INTERP_BILINEAR:
+ case PIXOPS_INTERP_BILINEAR:
bilinear_make_fast_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
- case GDK_INTERP_HYPER:
+ case PIXOPS_INTERP_HYPER:
bilinear_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.);
break;
}
@@ -1512,7 +1512,7 @@ pixops_scale (guchar *dest_buf,
gboolean src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type)
+ PixopsInterpType interp_type)
{
PixopsFilter filter;
PixopsLineFunc line_func;
@@ -1530,22 +1530,22 @@ pixops_scale (guchar *dest_buf,
switch (interp_type)
{
- case GDK_INTERP_NEAREST:
+ case PIXOPS_INTERP_NEAREST:
pixops_scale_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha,
scale_x, scale_y);
return;
- case GDK_INTERP_TILES:
+ case PIXOPS_INTERP_TILES:
tile_make_weights (&filter, scale_x, scale_y, 1.0);
break;
- case GDK_INTERP_BILINEAR:
+ case PIXOPS_INTERP_BILINEAR:
bilinear_make_fast_weights (&filter, scale_x, scale_y, 1.0);
break;
- case GDK_INTERP_HYPER:
+ case PIXOPS_INTERP_HYPER:
bilinear_make_weights (&filter, scale_x, scale_y, 1.0);
break;
}
diff --git a/gdk-pixbuf/pixops/pixops.h b/gdk-pixbuf/pixops/pixops.h
index 8aa06b630..d0cbfb82f 100644
--- a/gdk-pixbuf/pixops/pixops.h
+++ b/gdk-pixbuf/pixops/pixops.h
@@ -2,10 +2,17 @@
#define PIXOPS_H
#include <glib.h>
-#include "gdk-pixbuf.h"
+/* Interpolation modes; must match PixopsInterpType */
+typedef enum {
+ PIXOPS_INTERP_NEAREST,
+ PIXOPS_INTERP_TILES,
+ PIXOPS_INTERP_BILINEAR,
+ PIXOPS_INTERP_HYPER
+} PixopsInterpType;
+
/* Scale src_buf from src_width / src_height by factors scale_x, scale_y
* and composite the portion corresponding to
* render_x, render_y, render_width, render_height in the new
@@ -27,7 +34,7 @@ void pixops_composite (guchar *dest_buf,
int src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type,
+ PixopsInterpType interp_type,
int overall_alpha);
/* Scale src_buf from src_width / src_height by factors scale_x, scale_y
@@ -52,7 +59,7 @@ void pixops_composite_color (guchar *dest_buf,
int src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type,
+ PixopsInterpType interp_type,
int overall_alpha,
int check_x,
int check_y,
@@ -81,7 +88,7 @@ void pixops_scale (guchar *dest_buf,
int src_has_alpha,
double scale_x,
double scale_y,
- GdkInterpType interp_type);
+ PixopsInterpType interp_type);
diff --git a/gdk-pixbuf/pixops/timescale.c b/gdk-pixbuf/pixops/timescale.c
index 76b2f8d19..bc890d437 100644
--- a/gdk-pixbuf/pixops/timescale.c
+++ b/gdk-pixbuf/pixops/timescale.c
@@ -76,16 +76,16 @@ dump_array (double times[3][3][4])
switch (j)
{
- case GDK_INTERP_NEAREST:
+ case PIXOPS_INTERP_NEAREST:
printf (" NEAREST\n");
break;
- case GDK_INTERP_TILES:
+ case PIXOPS_INTERP_TILES:
printf (" TILES\n");
break;
- case GDK_INTERP_BILINEAR:
+ case PIXOPS_INTERP_BILINEAR:
printf (" BILINEAR\n");
break;
- case GDK_INTERP_HYPER:
+ case PIXOPS_INTERP_HYPER:
printf (" HYPER\n");
break;
}
@@ -152,24 +152,24 @@ int main (int argc, char **argv)
dest_buf = g_malloc(dest_rowstride * dest_height);
memset (dest_buf, 0x80, dest_rowstride * dest_height);
- for (filter_level = GDK_INTERP_NEAREST ; filter_level <= GDK_INTERP_HYPER; filter_level++)
+ for (filter_level = PIXOPS_INTERP_NEAREST ; filter_level <= PIXOPS_INTERP_HYPER; filter_level++)
{
printf ("src_channels = %d (%s); dest_channels = %d (%s); filter_level=",
src_channels, src_has_alpha ? "alpha" : "no alpha",
dest_channels, dest_has_alpha ? "alpha" : "no alpha");
switch (filter_level)
{
- case GDK_INTERP_NEAREST:
- printf ("GDK_INTERP_NEAREST\n");
+ case PIXOPS_INTERP_NEAREST:
+ printf ("PIXOPS_INTERP_NEAREST\n");
break;
- case GDK_INTERP_TILES:
- printf ("GDK_INTERP_TILES\n");
+ case PIXOPS_INTERP_TILES:
+ printf ("PIXOPS_INTERP_TILES\n");
break;
- case GDK_INTERP_BILINEAR:
- printf ("GDK_INTERP_BILINEAR\n");
+ case PIXOPS_INTERP_BILINEAR:
+ printf ("PIXOPS_INTERP_BILINEAR\n");
break;
- case GDK_INTERP_HYPER:
- printf ("GDK_INTERP_HYPER\n");
+ case PIXOPS_INTERP_HYPER:
+ printf ("PIXOPS_INTERP_HYPER\n");
break;
}