forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
9c7f0f8c2a
commit
ef79a175b5
@ -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.
|
||||
|
@ -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@
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user