summaryrefslogtreecommitdiff
path: root/downscaling.c
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2008-10-06 19:34:20 -0400
committerSøren Sandmann Pedersen <sandmann@redhat.com>2008-10-06 19:34:20 -0400
commitabbc0178bae8152a1ebec04683d6b2036271d165 (patch)
tree9d31aaa8ca396d0d77e023e2ce4998df3ea37834 /downscaling.c
parent0e663ca0f24a1c9938d7d502434214c2d3374d2a (diff)
More unimplemented filters
Diffstat (limited to 'downscaling.c')
-rw-r--r--downscaling.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/downscaling.c b/downscaling.c
index d0dd3b9..2dbfb43 100644
--- a/downscaling.c
+++ b/downscaling.c
@@ -256,7 +256,7 @@ create_gaussian_kernel (int r, int *n_params)
double v = (1 / (2 * G_PI * sigma * sigma)) * exp (-(j * j + i * i) / (2 * sigma * sigma));
- g_assert (idx < n_params);
+ g_assert (idx < *n_params);
params[idx] = _cairo_fixed_16_16_from_double (v);
@@ -303,11 +303,32 @@ set_nearest (pixman_image_t *image, int w, int h)
pixman_image_set_filter (image, PIXMAN_FILTER_NEAREST, NULL, 0);
}
+static void
+set_lanczos (pixman_image_t *image, int w, int h)
+{
+ g_error ("Lanczos filter is not implemented yet");
+}
+
+static void
+set_box (pixman_image_t *image, int w, int h)
+{
+ g_error ("Box filter is not implemented yet");
+}
+
+static void
+set_pixbuf (pixman_image_t *image, int w, int h)
+{
+ g_error ("Pixbuf filter is not implemented yet");
+}
+
static const filter_t filters[] =
{
{ "nearest", set_nearest },
{ "bilinear", set_bilinear },
- { "gaussian", set_gaussian /* FIXME */ },
+ { "gaussian", set_gaussian },
+ { "lanczos", set_lanczos },
+ { "box", set_box },
+ { "pixbuf", set_pixbuf },
{ NULL },
};
@@ -444,7 +465,7 @@ main (int argc, char **argv)
G_CALLBACK (gtk_widget_queue_draw), da);
}
- gtk_window_set_default_size (GTK_WINDOW (window), info.width, info.height);
+ gtk_widget_set_size_request (da, info.width, info.height);
#if 0
g_print ("width %d, height %d, pixels: %p, stride: %d, format: %d\n",